CS 163/164, Spring 2018
Programming Assignment - P1
Let's Get Started!
Due Monday, Jan. 22nd at 6:00 pm;
Late deadline Tuesday, Jan. 23rd at 8:00am
Objectives of this Assignment
- To write a Java program with console output,
- to learn how to submit your Java program to the Checkin tab,
- to understand how preliminary testing works, and
- to see if you can follow instructions.
Instructions
Write a Java program file called P1.java with a class name P1, an example of
the code structured is shown below. All of the Java code you write should be contained
in the main method. For this assignment, you must follow the directions below
exactly:
- Create a project in Eclipse called P1.
- Create a class in the project called P1.
- Let Eclipse create a main method in P1.java.
- Copy the comment block below and personalize it
- The Program should output:
- On the first line of output print "Java programming is great!".
- On the second line of output print your last name, a comma, a space, and your first name.
- On the third line print your major or "Undeclared".
- On the fourth line print the value of 1234 multiplied by 2.
Make the computer do the math for you!
- On the fifth line print the due date of this assigment in the format MM/DD/YYYY.
- On the sixth line print the "CS163/4: CS1 Java"
- On the seventh line print a sentence about why you are taking this class.
- Some additional directions for the seventh line, as follows:
- Must start with a capital letter.
- Must end with a period.
- Must be between 60 and 80 characters total, including white space.
Program Structure
// P1 Assignment
// Author: Colonel Mustard
// Date: 1/22/2018
// Class: CS163/CS154
// Email: eid@cs.colostate.edu
public class P1 {
public static void main(String[] args) {
// Print statements go here
}
}
Sample Output
Your program should print seven lines, and should match the output shown below,
except as described here. You must print exactly what is requested. Spelling errors,
incorrect capitalization, extra or missing white space and any other difference will
reduce your grade. The second line will have your name instead of mine. The third line
may differ, so it will not be checked, but it must be present! The fourth, fifth and sixth
lines must have exactly the strings shown. The seventh line must follow the specification
given above. See the grading criteria below for additional information.
Java programming is great!
Say, Benjamin
Computer Science
2468
01/22/2018
CS163/4: CS1 Java
I am in this class because I really like computer programming.
Specifications
- Work on your own, as always.
- The name of the source code file must be exactly
P1.java
- Name the file exactly - upper and lower case matters!
- Comments at the top as shown above.
- Assignments should be implemented using Eclipse.
- Assignments should be implemented using Java, version 1.8.
- Make sure your code runs on machines in the CSB 120 lab.
- Turn in through Checkin.
- Read the syllabus for the late policy.
- We will be checking programs for plagiarism, so please don't copy from anyone else.
Grading Criteria
- 100 points for perfect submission.
- 0 points for no submission, will not compile, submitted class file, etc.
- Preliminary Tests
- testCompile: checks that program compiles. (10 points)
- testComment: checks the comment block at top of program. (10 points)
- test1: checks first line of output. (5 points)
- test2: checks second line of output. (5 points)
- test3: checks third line of output. (5 points)
- test4: checks fourth line of output. (5 points)
- test5: checks fifth line of output. (10 points)
- test6: checks sixth line of output. (10 points)
- Final Tests
- test7: checks that seventh line starts with a capital letter. (10 points)
- test8: checks that seventh line ends with a period. (10 points)
- test9: checks that seventh line has between 60 and 80 characters. (10 points)
- test10: checks that program has exactly seven lines of output. (10 points)
- Preliminary testing only checks the first through sixth lines.
- Final grading checks the remaining criteria, and includes the preliminary tests.
Submit P1.java to Checkin, using the checkin tab.