Answered step by step
Verified Expert Solution
Question
1 Approved Answer
( 2 0 pts ) Suppose someone wants to produce a menu prompt on - 5 creen cartography ( map - making ) application that
pts Suppose someone wants to produce a menu prompt oncreen cartography mapmaking application that prints the five lines below: The main menu has three available options:
Press the key to create a new map.
Press the key to load an existing map.
Press the key to quit the application.
The default map storage directory is "CiMyMaps"
Create the above menu prompt using a single System.out.printlin statement.
pts The following changes deal with the Rectangle class from Week material, available via BlackBoard under "Chapter Code" in "SupplementaryMisc Each part is worth points.
i Modify the dimension attributes of the Rectangie class to properly handle the double datatype instead of simple integers.
ii Modify the Rectangle class to permit construction of rectangles using zero input arguments in which case both height and width are set to or one input argument in which case the height is set to the input value, and the width is set to be Hint you will need to employ overloading.
iii. Modify the Rectangle class to have method double PrintMaxSide which returns not prints! the largest available dimension between the height and width ie if the height is larger, it should be returned, if the width is larger, it should be returned instead
iv Modify the Rectangle class to have method void IsValid which either i prints This is a valid rectangle." If height and width are both positive or ii prints "This is not a valid rectangle." if either height or width is or negative.
Note: parts iii and iv will almost certainly require if statements.
pts This problem deals with reading input from the kevboard and files and applying simple arithmetic calculations. Create class Product Cumulator with the i void Product fromkeyboard:
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