Question: You will be writing a more complex modular program that uses at least two types of loops, validates user input. You should include a test
You will be writing a more complex modular program that uses at least two types of loops, validates user input. You should include a test plan but it is optional.
Write a program that will allow a grocery store to keep track of the total number of bottles collected for seven days. The program should allow the user to enter the total number of bottles returned for seven days (enforce a validation of your choice). The program will calculate the total number of bottles returned for the week and the amount paid out (the total returned times .10 cents). The output of the program should include the total number of bottles returned and the total paid out.
Make sure your program meets the following. You are encouraged to be creative on validations, and pick something that has meaning for you, because you'll have more fun. Feel free to create a more complex program as long as the basic features are there.
Requirements
Submission should consist of a Python file, plus a document .docx containing a test plan. The python file should meet all of the following requirements:
A comment at the top with a brief description of the program, including Input List and Output List.
Full pseudocode should be included in the comments.
It must have input and output.
It must validate the user input. This means the user is not allowed to just enter any value. You must check the value, and ask the user to enter it again, and repeat this loop until the user enters a valid value.
Your program must use at least two types of loops in meaningful ways.
It should be organized into separate modules (one module for input, one module for output, and one module for each separate calculation or action that the program is to perform [that is, each module should be "cohesive" and should only do one thing]).
Use parameters and arguments to pass values into your modules (don't use global variables if you can).
The Python code should run correctly, and the logic should match your pseudocode.
The test plan document should meet all of the following requirements:
Write the test plan as if for someone who cannot see your source code (utilize black-box testing). They can only run the program, provide inputs, and observe outputs.
For each test case, include at least the following fields: Summary, Test Procedure, Test Data, Expected Result. Feel free to add more fields if you want to.
Include test cases for all important categories of input (valid, invalid, boundary, etc.). If your program passes every test case in your test plan, you should be confident that it functions correctly.
Be sure to run your program against the test plan to determine its correctness, and fix any bugs found.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
