Requirements: A surveyor requires a program that allows the user to enter a value in square...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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). 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).
Expert Answer:
Answer rating: 100% (QA)
Heres an implementation in Java for the program that meets the requirements and design provided impo... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
Write a Python program that allows the user to enter a four-digit binary number and displays its value in base 10. Each binary digit should be entered one per line, starting with the leftmost digit...
-
Create a program that allows the user to enter an unknown number of sales amounts for each of three car dealerships: Dealership 1, Dealership 2, and Dealership 3. The program should calculate the...
-
Write a program that allows the user to enter his or her name. The program should output a username for entry into a website. The user should be prompted to enter a first name, middle initial, and...
-
Pelicans tuck their wings and free fall straight down when diving for fish. Suppose a pelican starts it dive from a height of 16.0m and cannot change its path once committed. If it takes a fish 0.20s...
-
1. How is training at Jack B. Kelley related to its organizational needs? 2. If you were involved in preparing JBKs safety training program, how would you assess employees readiness for training? In...
-
ET Mag Wheels of Benicia, California had the following transactions during the month of July 2 0 2 3 : Purchased raw materials on account, $ 9 1 , 6 0 5 . Raw Materials of $ 7 6 , 0 5 0 were...
-
For the similarity solution, what are the boundary conditions for the constant-wall-flux case? Show that a complete similarity does not exist for this case. Also show the condition for the case where...
-
On October 5, 2014, Diamond in the Rough Recruiting Group Inc.'s board of directors decided to dispose of the Blue Division. A formal plan was approved. Diamond derives approximately 7 5% of its...
-
Nolan Corp. uses no debt. The weighted average cost of capital is 6.7 percent. The current market value of the equity is $28 million and the corporate tax rate is 21 percent. What is the company's...
-
The proposed rates were not in the range the CEO expected given the pricing analysis. The CEO has asked the pricing actuary to verify the total projected loss cost excluding potential large storm...
-
Beta is a statistical measure of: unsystematic risk the relationship between an investment's returns and the market return. the standard deviation total risk
-
What economic forces affect valuations?
-
What are the strengths and limitations of scenario analysis?
-
What is the role of the term sheet?
-
Given that \(E_{p}(x, \delta)\) from Theorem 1.13 can be written as \[E_{p}(x, \delta)=\frac{1}{p !} \int_{x}^{x+\delta}(x+\delta-t)^{p} f^{(p+1)}(t) d t\] show that \(E_{p}(x, \delta)=\delta^{p+1}...
-
Why do preferred shares automatically convert in case of an IPO?
-
You have an eccentric aunt who has promised to deposit $6,875 in a savings account in your name. She has stated that you will not have access to the money for six years but that the money will be...
-
An Atomic Energy Commission nuclear facility was established in Hanford, Washington, in 1943. Over the years, a significant amount of strontium 90 and cesium 137 leaked into the Columbia River. In a...
-
a. The Palmertown Elementary School has 30 classrooms. The children in the school donate used books to sell at an annual fundraising book fair. Write a program that accepts each teachers name and the...
-
Multithreaded programs usually _______ than their procedural counterparts. a. Run faster b. Are harder to use c. Are older d. All of the above
-
Design the wireframes and storyboard, interactivity diagram, object dictionary, and any necessary scripts for an interactive program for customers of Sandersons Ice Cream Sundaes. Allow customers the...
-
A container of an organic liquid a $25^{\circ} \mathrm{C}$ has a mass of $1100 \mathrm{~kg}$ and a volume of $0.94 \mathrm{~m}^{3}$. Find the liquid's weight, its density, and its specific gravity.
-
What is the pressure one mile $(1.6 \mathrm{~km})$ beneath the ocean's surface?
-
A vertical, cylindrical tank with a diameter of $10 \mathrm{~m}$ and a depth of $4 \mathrm{~m}$ is filled to the top with water at $25^{\circ} \mathrm{C}$. If the water is heated to $60^{\circ}...
Study smarter with the SolutionInn App