Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Requirements: A surveyor requires a program that allows the user to enter a value in square inches and then displays the combination of acres,
Requirements: A surveyor requires a program that allows the user to enter a value in square inches and then displays the combination of acres, square yards, square feet, and square inches so that each value is maximized in order by acres, square yards, square feet, and finally square inches. The input value should not exceed 1,000,000,000 square inches. You can assume the user will always enter a non-negative value; however, negative values will also work. Design: The surveyor would like the output to look as shown below in the two examples when 1234567890 is entered as the input for one run and 987654321is entered for another run. All numeric variables should be of type int. Example #1 Line # 1 2 3 Example #2 Line # 1 4567AWNI Program output --jGRASP exec: java SquareUnits Enter the area in square inches: 1234567890 Limit of 1,000,000,000 square inches exceeded! --jGRASP: operation complete. 2 Program output ----jGRASP exec: java SquareUnits Enter the area in square inches: 987654321 Number of Units: Acres: 157 Square Yards: 2198 Square Feet: 8 Square Inches: 81 --jGRASP: operation complete. Your program must follow the above format with respect to the output. Note that lines 3 through 6 begin with tab (i.e., your output should use the escape sequence for a tab). Code: In order to receive full credit for this assignment, you must calculate the number of each unit (acres, square yards, square feet, square inches) and store the value in a variable of type int. It is recommended as a practice that you do not modify input values once they are stored. Note that an acre contains 6,272,640 square inches, a square yard contains 1,296 square inches, and a square foot contains 144 square inches. Your expressions should contain only int variables or int literals. Commas are not allowed in Java numeric literals (1,296 may be entered as1296 or 1_296) (6,272,640 may be entered as 6272640 or 6_272_640).
Step by Step Solution
★★★★★
3.43 Rating (156 Votes )
There are 3 Steps involved in it
Step: 1
Heres an implementation in Java for the program that meets the requirements and design provided impo...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