Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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 (Max Killermen).

The second line of text printed says "hello world."

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:

1.No command-line arguments given. This text appears when there are no additional command-line arguments.

2.The command-line arguments say "OOP". This text appears when there is one command-line argument, the text "OOP".

3.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-charcter String, "132".

4.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 Part2 and the command-line was:

"java Part2 OOP"

my script could print out:

My name is Max Killermen Hello world. The command-line arguments say "OOP".

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Problem: Evaluate the integral: I = 1- 1 dx 9

Answered: 1 week ago

Question

Describe the Indian constitution and political system.

Answered: 1 week ago

Question

Explain in detail the developing and developed economy of India

Answered: 1 week ago

Question

Problem: Evaluate the integral: I = X 52+7 - 1)(x+2) dx

Answered: 1 week ago

Question

11. Are your speaking notes helpful and effective?

Answered: 1 week ago

Question

The Goals of Informative Speaking Topics for Informative

Answered: 1 week ago