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
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