A01

Due Date: Friday, 15 January 2021
File(s) to be submitted: WhoAmI.java


SUBMIT   /   Check

Simple Output

Synopsis

For this assignment, you must create a Java program (WhoAmI) that prints out your given name in large letters, followed by a bit more information about you. For example:
Who Am I -------- CSCI 1228 -- Winter 2021 * * * **** * * ** ** * * * * * * * * * ***** **** *** * * * * * * * * * * * * * * * * A00000000: Mark Young
The required letter-forms are here.

Details

There is really not much to this assignment. It is partly just to get you back into programming, and also as an exercise in following instructions. Computers are very precise in their requirements, and you must be very precise yourself if you are to prosper as a programmer. Pay careful attention to the following requirements, because much of your grade will depend on how well you satisfy them.
  1. The output starts with one blank line.
  2. The second line has the title "Who Am I" written on it, while the third line has a row of hyphens -- one hyphen for each character in the title above.
  3. The fourth line is also blank.
  4. The fifth line has "CSCI 1228 -- Winter 2021" written on it.
  5. The sixth line is blank.
  6. The seventh thru eleventh lines have your given name written on them, in BIG CAPITAL LETTERS. The letters are each five characters tall and five characters wide. There are two spaces between the edges of the characters. That is, the first character in in columns 1 to 5, the second character is in columns 8 to 12 (columns 6 and 7 being spaces), the third character is in columns 15 to 19 (columns 13 and 14 being spaces), and so on.

    If your given name is more than 11 characters long then you should abbreviate it. (Otherwise the output line would be more than 80 characters long, which would make it look very ugly.)

  7. The twelfth line is blank.
  8. The thirteenth line contains your student number and your name (at least your given and family names). There is a colon (:) after your student number, and one space after that. There is only one space between each part of the name (including your "middle" names, if you wish to give them).
  9. Line fourteen is blank.
  10. Lines two, three, five and thirteen are to be centred above and below lines seven to eleven (the ones with the LARGE characters on them). In the example above, lines seven to eleven are 26 characters wide. The text of line five has 24 characters on it, so I added one space each at the beginning and end of line five (two extra spaces, divided equally between front and back).
    If your given name has six characters in it, then your lines seven to eleven will be 40 characters wide -- fourteen characters wider -- meaning that you should have eight spaces at the beginning and end of your line five.

    If the number of extra spaces is odd, then the extra space should go in front (on the left). For example, my line thirteen is 21 characters wide -- five characters shorter than my lines seven to eleven. I put three spaces in front of the text, and two in back.

    It is possible that your line five or thirteen is actually longer than the lines with your LARGE name on it. In that case, you are to indent your LARGE name so that it is centred between lines five and thirteen. For example:


    CSCI 1228 -- Winter 2021 * **** * * * * ***** **** * * * * * * **** A00000000: Ab Doubleday

    It is possible to make the program figure out how to centre the lines. But for now, you figure out how many spaces are required and put them in yourself. Be sure to include spaces at the ends of lines as well as the beginnings. All lines except the blank ones should be the same length.

And while that is all your program must do, keep in mind that it must still satisfy the standard style guidelines In particular, that means:

  1. The opening javadoc comment is present and has all required parts.
  2. Code lines are indented four spaces per level (no TABs).
  3. Opening and closing braces are appropriately placed.
  4. Every line is less than 80 characters long.
    If your given name is more than seven characters long, then you really need to look out for this -- you can't fit more than seven of the wide characters on the same line as the System.out.println command. You will need to split your command onto two lines. If your name is more than nine characters long, you may need to split the command onto three lines.
  5. Everything is spelled properly.


Grading Outline


SUBMIT   /   Check