Comp1210 Project 1: Introduction to Java solution

$30.00

Original Work ?

Download Details:

  • Name: Project01.zip
  • Type: zip
  • Size: 34.54 KB

Category: You will Instantly receive a download link upon Payment||Click Original Work Button for Custom work

Description

5/5 - (3 votes)

Overview: You will write two programs this week.  One will print your short-term, medium-term, and long-term life goals to standard output, and the other will display letter J as a large block letter.  Because these are small programs, you will only need to have 1-2 sentences of description in your class and method Javadoc comments (don’t forget the @author and @version tags in the class-level comment).

 

  • MyLifeGoals.java

 

Requirements: Write the application MyLifeGoals that prints your name, your short-term, medium-term and long-term life goals.

 

Design: Your program should contain a main method that prints the information listed under “Output” (i.e., your output should replace the text in Italics).

 

Output:

 

Your first and last name (separated by a space)

(The second line should be blank)

Describe your short-term life goals.(in one line)

Describe your medium-term life goals. (in one line)

Describe your long-term life goals. (in one line)

 

Describe your life goals (if you have never thought about them, this is a good chance to think about them carefully). The actual output for each line needs to be at least 100 characters not including spaces.

 

Code and Test: The expected output for the program will vary from student to student, but it is important to follow output pattern described above, formatting requirements, and minimum character requirements. If you aren’t sure how many characters are in your output, you can copy your output into Microsoft Word and use the Word Count feature under the Review ribbon.

.JLetter.java

 

Requirements: Write the application JLetter that displays letter J as a large block letter composed of the character ‘J’ arranged in a pattern with a width of 12 characters and a height of 10 lines.   Each line should begin in column 1 with appropriate leading spaces in lines 3, 4, 5, and 6.  Trailing spaces at the end of each line should be avoided.

 

Design: Your program should contain a main method that prints exact the same pattern as shown in Figure 1. This means that you should have 10 lines of output with each line in the pattern indicated.

 

JAVAJAVAJAVA JAVAJAVAJAVA

JAVA         JAVA

JAVA

JAVA  J     JAVA

JA    JAVA  JAVAJAVA   JAVAJA

 

Figure 1. Output from JLetter program

 

 

Code and Test: The expected output contains 10 lines of letters in the specified order.  Note that the first line of output has no leading spaces.   Make sure that you print the pattern exactly as it appears above.

 

Grading

Web-CAT Submission: You’ll have 10 attempts to receive full credit for your two program files, but you should try to get everything right on the first submission.  Make sure that you submit both programs files at the same time.  If you only submit one of the files, the submission will receive zero points for correctness.  Activity 1 describes how to create a jGRASP project containing both of your files.