Question: Complete the code, compile, and run (make sure the program runs as specified). /* File: HelloWorldTwo.java * Author: Big Boss * CST 261 - ###

Complete the code, compile, and run (make sure the program runs as specified).

/* File: HelloWorldTwo.java * Author: Big Boss * CST 261 - ### * Instructor: Professor Kojima * Date: January 1, 1970 (Why is is not true?) * Last Modified: January 1, 1970 (Still not true) * * Description: Variation on the ubiquitous "hello, world!" * program. * * Usage: java HelloWorldTwo [OPTION] or no option * * Options: * * -h The option -h is used to send the string "hello" is * sent to the standard output device * * -w The options -w is used to send the string "world is * sent to the standard output device * * If no option is provided, then the string "hello, world!" is sent to * the standard output device. */

/** *

HelloWorldTwo

* *

HelloWorldTwo implements a program which either writes * "hello", "world", or "hello, world!" to the standard output. *

* */ public class HelloWorldTwo {

/** * Program entry point * * Preconditions: a string of length > 0 passed to the * main method through the command line arguments or * no argument is provided * Postcondition: a string output written to * standard output * * @param args args[0] should contain the value "-h", * "-w", or none. */ public static void main(String[] args) { // TODO: Your code goes here } } // end of class HelloWorldTwo

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!