Answered step by step
Verified Expert Solution
Question
1 Approved Answer
PROBLEM DESCRIPTION: You are to compute the surface area of a package. Packages are defined by their length (1), height (h), and width (w). Package
PROBLEM DESCRIPTION: You are to compute the surface area of a package. Packages are defined by their length (1), height (h), and width (w). Package parameters of interest are volume, surface area, and edge length, where: a. Surface area SA, in square inches. SA == 2.1.h+w.h+l.w). b. Surface area in square centimeters, SASI = 2.54 -2.54.2. (l.h+w.h+lw) SOFTWARE REQUIREMENTS: R1. The software shall correctly compute the package surface area, SA. R2. The software shall correctly compute the package surface area, SASI. R3. The software shall accept user input for package I, w, and h. Units are in inches. R4. The software shall display SA and SASI for the I, w, and h values entered by the user. R5. The software shall display SA and SASI for the three test cases provided below. TEST CASES: Test cases are given in Table 1 for requirements R1 and R2. Note: You do not need to fill out the "Actual Output" cells in the table. They are provided for reference only. Table 1: Test Cases Actual Test Expected Output Cases Input Parameters Output R1 R2 1 length = height = width = 0.0 2 length = 15.0, height = 10.0,width = 0.0 300.0 length = 10.0, height = width = 1.0 42.0 R1 R2 0.0 0.0 1935.48 270.97 3 Note: For this assignment, the requirements and test cases have been provided to you. In future assignments you may be required to create your own requirements and test cases. INSTRUCTIONS: Create a Java file, SurfaceAreaCalculator.java, to meet requirements R1 through R5, and PROBLEM DESCRIPTION: You are to compute the surface area of a package. Packages are defined by their length (1), height (h), and width (w). Package parameters of interest are volume, surface area, and edge length, where: a. Surface area SA, in square inches. SA == 2.1.h+w.h+l.w). b. Surface area in square centimeters, SASI = 2.54 -2.54.2. (l.h+w.h+lw) SOFTWARE REQUIREMENTS: R1. The software shall correctly compute the package surface area, SA. R2. The software shall correctly compute the package surface area, SASI. R3. The software shall accept user input for package I, w, and h. Units are in inches. R4. The software shall display SA and SASI for the I, w, and h values entered by the user. R5. The software shall display SA and SASI for the three test cases provided below. TEST CASES: Test cases are given in Table 1 for requirements R1 and R2. Note: You do not need to fill out the "Actual Output" cells in the table. They are provided for reference only. Table 1: Test Cases Actual Test Expected Output Cases Input Parameters Output R1 R2 1 length = height = width = 0.0 2 length = 15.0, height = 10.0,width = 0.0 300.0 length = 10.0, height = width = 1.0 42.0 R1 R2 0.0 0.0 1935.48 270.97 3 Note: For this assignment, the requirements and test cases have been provided to you. In future assignments you may be required to create your own requirements and test cases. INSTRUCTIONS: Create a Java file, SurfaceAreaCalculator.java, to meet requirements R1 through R5, and
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