The Software Development Process as presented by Cay Horstmann [1] will be used as the basis...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
The Software Development Process as presented by Cay Horstmann [1] will be used as the basis for this lab assignment. 1) Understand the problem 2) Develop and Describe an Algorithm 3) Test Algorithm with Simple Inputs Overview A potato chip company makes plain potato chips in two different bag sizes, Regular at 9.25 oz and Large at 15.75 oz For quality control, the company samples bags for weight as they are produced at the factory using a sensitive scale that can measure weights in ounces to 4 decimal places. ● ● ● ● 4) Translate the Algorithm into Java 5) Compile and Test Your Program ● The chip company wants software that will allow a worker to input the size of the bag and the actual weight measured. Once the data is entered the program will report the number of good and bad bags and also report the total number of bags entered so far. The program should repeat this process until the user no longer needs to enter measurements. If a bag weight is 0.01 oz different or more from the expected weight (either above weight, or below weight) then this is considered a bad bag. Task 1: Understand the problem Examine the starter code, read the ToDo comments, briefly outline in general how you will code these methods: public boolean is BagCorrect Weight() public static void main(String[] args) ● For this prototype program you are not required to validate invalid input e.g. text when a number is expected, or negative values, however users can make mistakes by entering an incorrect chip bag size, in that event report an error and ask them to enter a correct size (do not increase any counts if there is an incorrect chip bag size entered). A junior programmer started a program but could not complete it, a senior programmer made some corrections and then added //ToDo comments and has now passed the project to you to complete it. Task 2: Develop and Describe an Algorithm Document the classes you have been provided using UML Class diagrams. O Remember, static class members should be underlined within a UML Class Diagram O You are not permitted to change the structure of the provided classes. Create pseudocode and flow-charts for the two methods listed above. O Just the two methods, you are not required to pseucode or flowchart all of the classes and other methods. O You are not permitted to alter the other methods provided, aside from adding programmer comments. Your main method must use an instance of class PotatoChipBag and class User. O O You may use any decision structure (if, or switch) and either a while or do-while loop in solving this assignment (A for loop is not recommended for this project) O The Conditional Operator is not accepted in place of a decision structure for marks in this assignment. Place the UML Class Diagrams, pseudocode, and flow charts in your MS Word document. Task 3: Test Algorithm with Simple Inputs ● Use three test tables: The Software Development Process as presented by Cay Horstmann [1] will be used as the basis for this lab assignment. 1) Understand the problem 2) Develop and Describe an Algorithm 3) Test Algorithm with Simple Inputs Overview A potato chip company makes plain potato chips in two different bag sizes, Regular at 9.25 oz and Large at 15.75 oz For quality control, the company samples bags for weight as they are produced at the factory using a sensitive scale that can measure weights in ounces to 4 decimal places. ● ● ● ● 4) Translate the Algorithm into Java 5) Compile and Test Your Program ● The chip company wants software that will allow a worker to input the size of the bag and the actual weight measured. Once the data is entered the program will report the number of good and bad bags and also report the total number of bags entered so far. The program should repeat this process until the user no longer needs to enter measurements. If a bag weight is 0.01 oz different or more from the expected weight (either above weight, or below weight) then this is considered a bad bag. Task 1: Understand the problem Examine the starter code, read the ToDo comments, briefly outline in general how you will code these methods: public boolean is BagCorrect Weight() public static void main(String[] args) ● For this prototype program you are not required to validate invalid input e.g. text when a number is expected, or negative values, however users can make mistakes by entering an incorrect chip bag size, in that event report an error and ask them to enter a correct size (do not increase any counts if there is an incorrect chip bag size entered). A junior programmer started a program but could not complete it, a senior programmer made some corrections and then added //ToDo comments and has now passed the project to you to complete it. Task 2: Develop and Describe an Algorithm Document the classes you have been provided using UML Class diagrams. O Remember, static class members should be underlined within a UML Class Diagram O You are not permitted to change the structure of the provided classes. Create pseudocode and flow-charts for the two methods listed above. O Just the two methods, you are not required to pseucode or flowchart all of the classes and other methods. O You are not permitted to alter the other methods provided, aside from adding programmer comments. Your main method must use an instance of class PotatoChipBag and class User. O O You may use any decision structure (if, or switch) and either a while or do-while loop in solving this assignment (A for loop is not recommended for this project) O The Conditional Operator is not accepted in place of a decision structure for marks in this assignment. Place the UML Class Diagrams, pseudocode, and flow charts in your MS Word document. Task 3: Test Algorithm with Simple Inputs ● Use three test tables:
Expert Answer:
Answer rating: 100% (QA)
Task 1 Understand the problem To understand the problem you should start by examining the starter code and read the ToDo comments The public boolean isBagCorrectWeight method is meant to check if a ba... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
Assume you are a Medieval knight attacking a castle with a cannon. The ball leaves the cannon with a speed of 3 8 . 7 m / s . The barrel's angle with respect to the ground is 4 0 . 5 o , and you make...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Read the case study "Southwest Airlines," found in Part 2 of your textbook. Review the "Guide to Case Analysis" found on pp. CA1 - CA11 of your textbook. (This guide follows the last case in the...
-
A manufacturer claims that the average tensile strength of thread A exceeds the average tensile strength of thread B by at least 12 kilograms. To test his claim, 50 pieces of each type of thread are...
-
Which would you expect to be a stronger acid, the lactic acid found in tired muscles or acetic acid? Explain. Lactic acid CH
-
The 1H NMR spectrum of 2-propen-1-ol is shown here. Indicate the protons in the molecule that give rise to each of the signals in the spectrum. 8 6 frequency 0
-
(a) In Figure 7.5, what is the momentum of the ball during the collision? (b) Is the momentum of the ball constant before, during, and after the collision? If so, why? If not, why not, and for what...
-
Modern Suits Rental has been in business for four years. Because the company has recently had a cash flow problem, management wonders whether there is a problem with receivables or inventories. Here...
-
Men Conference Ltd has an authorized share capital of 60,000,000 ordinary shares of Sh. 10 each and 500,000 shares of Sh. 50 each. The following trial balance of the company was extracted as at 31.12...
-
Right Company purchased 25,000 common shares (25%) of ON Inc. on January 1, Year 11, for $250,000. Right uses the equity method to report its investment in ON because it has significant influence in...
-
A 5 tonne railway car is being shunted along a section of track. It then strikes the buffer spring. If the car is travelling at 2 m/s when it strikes the spring, calculate the maximum compression of...
-
Explain how cost to serve (CTS) can support management in customer profitability analysis.
-
Interpret the following statement by Ting-Toomey through description and example: Collectivists need to work on their ethnocentric biases as much as the individualists need to work out their sense of...
-
Explain how EVT might inform research and thinking on touch behavior. For instance, does the theory help us to understand the difference between appropriate and inappropriate touch? Explain with...
-
Discuss the (possible) interplay of SPT with Instagram, Snapchat, LinkedIn, and Facebook.
-
How would you illustratewith a picturethe overlap between and among the various communication traditions?
-
CODE IN JAVA Magic Squares. A magic square of order n is an arrangement of n ?n numbers, usually distinctintegers, in a square, such that the n numbers in all rows, all columns, and both diagonals...
-
What are the principal alloying elements in SAE 4340 steel?
-
Refer to the information in problem 6-22. Assume that the company uses a periodic inventory system and counts inventory at the end of each month. Data from 6-22. Required: Using the LIFO cost method...
-
Golf Is Great Corp.s condensed balance sheet for the year ended December 31, 2017, follows: Golf Is Greats 2018 transactions are as follows: Net income for the year was $27,000 after recording...
-
Fraternal Brothers provides consulting services on contract for a standard hourly rate of $100 per hour. The contracts allow the company to invoice the client evenly during the contract period. The...
-
In what way are glaciers like dirty snowballs?
-
Distinguish between mechanical and chemical weathering.
-
Name an environment where wind shapes the landscape to a significant degree.
Fuel Cycle To Nowhere U S Law And Policy On Nuclear Waste 1st Edition - ISBN: 0826517749 - Free Book
Study smarter with the SolutionInn App