Copyright © – Sudharsan Iyengar
Lab #1 CS-234 Iyengar
Objective: To use the Integrated Development Environment (IDE) Eclipse, Java Development Kit (JDK), and to write and run a simple Java program.
A: Install Eclipse: Go to www.eclipse.org download and install.
Create a shortcut to the eclipse application and place the shortcut on the desktop, and pin to taskbar.
Launch eclipse
Accept the default location for workspace.
Create a Java Project with the name “LAB1”
Within this project – create a Java class (with main) called “myWelcome”. This program will present a welcome message to the user.
In the comments section of this class – include your name, class, today’s date, and a short description of this lab exercise.
Include statements in the class that will use the JOptionPane to output the following message.
“Welcome to the Computer Science Department at Winona State University. Computer Science deals with the tools, techniques and methods for developing correct, efficient,
and flexible software solutions. This class deals with learning the tools and skills to develop basic algorithms for common computational problems”
Compile and execute this program.
Export this project to your folder in \\store\classes\
B: Extend the myWelcome class to do the following:
i. To request the user’s name
ii. In addition to the message in part A – you should also include the user’s name and today’s date and time as follows:
Welcome Dear [user’s name]. Today is [date] and the time is [time].