Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

T$he goal of this assignment is To learn how to use command line arguments Your task is to write an appli$cation that prints stars (*)

T$he goal of this assignment is To learn how to use command line arguments Your task is to write an appli$cation that prints stars (*) or dollar signs ($) depending on the command line argument. The first command line argument must be a string of star or dollar. The second command line argument is the the number of the symbols to be printed in total. The third command line argument is the number of the symbols to be printed in a line. If the argument values are not valid, print the usage and quit the application. See Fig 7.21 to see how you can convert a string to an integer.

Your code must compile from the windows command line using the following commands.

> java PrintSymbols star 7 3

***

***

*

> java PrintSymbols dollar 9 5

$$$$$

$$$$

> java PrintSymbols comma 10 2 Usage: java PrintSymbols [star|dollar] number_of_symbols number_of_symbols_per_line

> java PrintSymbols star 10 Usage: java PrintSymbols [star|dollar] number_of_symbols number_of_symbols_per_line

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

Pro Database Migration To Azure Data Modernization For The Enterprise

Authors: Kevin Kline, Denis McDowell, Dustin Dorsey, Matt Gordon

1st Edition

1484282299, 978-1484282298

More Books

Students also viewed these Databases questions