Question
I'm a little confused on this, any help would be appreciated. The Class File The Java class shall be an application that prints three lines
I'm a little confused on this, any help would be appreciated.
The Class File
The Java class shall be an application that prints three lines of text. The first line of text printed by the application shall include your name. This should be the name (first and last) that you're using on Canvas. The second line of text printed by the script shall be some World Wide Web-verifiable fact. Wikipedia is a good resource to use for finding some verifiable fact. These facts shall be unique within the class. Use the forum posting in Part 1 of this assignment to ensure uniqueness of your fact. The third line will respond to input from the command-line. When a program is run, additional information can be given on the command-line, following the name of the application class, that is, the class with the application method. This information appears in the String array parameter of the application method. There are exactly four possible third-lines:
- No command-line arguments given. This text appears when there are no additional command-line arguments.
- The command-line arguments say "OOP". This text appears when there is one command-line argument, the text "OOP".
- The command-line arguments say "CptS 132". This text appears when there are two command-line arguments, the text "CptS 132", specifically, a four-character String, "CptS", followed by a three-character String, "132".
- The command-line arguments are not recognized. This text appears when there are command-line arguments which do not match any cases listed above.
For example, assuming my application class was named HW1 and the command-line was:
java HW1 OOP
my application could print out:
My name is Helen Carp Java is the most populous island in the world. The command-line arguments say "OOP".
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started