Hello guys! I am taking a Java class online at the University I attend and this is my first assignment!
Exercise
Write a Java program to print the following information on
separate lines.
1. Your name.
2. The Department Name, Course Number, and Time for each course that you are taking this semester. Put the information for each course on a separate line.
3. Skip two lines (see notes for explanation).
4. The email address that you regularly use.
Notes and Comments
The file MUST be named as LastnamePass1.java (for example, my last name is Li, it will be named as LiPass1.java). Be sure to compile your program, correct any syntax errors, recompile until no errors, then test the program with different values. Upload only the .java file to D2L dropbox folder named Programming Assignment 1.
Note 1:
Use System.out.println( ) without any arguments to generate a new line character (i.e.,skip a line).
Note 2:
In Java, the class name and the file name must match exactly(case-sensitive).
If the file name is LastnamePass1.java, the Java class must also be LastnamePass1. Otherwise it will fail the compiling and you will lose 20 points for this.
Note 3:
Please pay close attention to the indentation and spacing. Read the code in the textbook to see how you can well format the source code.
This is my first try at it....ehhh? Better way to do it?
Simba Code:
public class Assignment1 {
public static void main(String[] args){
System.out.println("Andrew Varnick");
System.out.println("Physics, 1930 5:10-7:20");
System.out.println("Chemistry, 2394 2:20-5:20");
System.out.println("Computer Science, 1015-W1");
System.out.println("Communications, 1200-WA2");
System.out.println();
System.out.println();
}
}