Selection/Loop statements
In this assignment, you will design a program to perform the following task:
You are going into the Lawn or House service business. Design and write your program that will prompt the user for a choice of services that you offer. You should allow the user to choose more than one option. This means you will need a loop and some way to exit the loop. Include a Welcome message explaining your services. You MUST offer at least FOUR choices. Also, offer a 10% discount for Senior citizens. You may offer whatever service you like and whatever price you like (although you prices should be realistic). You may do either Lawn Service or House Service (or both if you like). There is a lot of flexibility in this assignment. Do NOT be prompting the user for the cost. Present a menu and let them chose which service(s) they want. Since we have not worked with Char or String data much, I suggest that you use integer menu choices. Don't forget to account for an Invalid selection. Calculate the total cost for the customer. Display the total cost of services, the discount amount (if any), and the final cost (after the discount is applied).
Some possible examples of choices might be:
LawnService HouseService
Lawnmowing Dusting Whole house or byroom
Edging Cleanbathrooms
Trimbushes Cleanfloors
Cleangutters Makebeds
Landscaping(mulch) Washwindows
Rakingleaves Clean outbasement
Note: You may use a submodular approach in you Design. But since we haven't done that in C yet, you may just include the submodule in the main sectioned off by comments ie.
/*** Submodule Welcome ***/ Welcome code here
/*** End submodule Welcome ***/
There are 4 components of your submission including:
• Analysis- Demonstrates your thought process and steps used to analyze the problem. Be sure to include the required input and output and how you will obtain the required output from the given input? Also, include your variable names and definitions. Be sure to describe the necessary formulas and sample calculations and processes that might be needed.
• Design - choose 1 of the following three designtools.....
o Program Design- A detailed, clear description of the program you are building. It should show the flow and logic of your program.(this is the outlineapproach)
o Flowchart - Provide a flowchart for your design. You can use Excel, Word, Powerpoint, Visio or any software you have available that will allow to draw shapes andconnectors
o Pseudocode- Provide pseudocode of your overall design that fulfillsthe requirements of theproject
• Test plan - Prepare at least 2 sets of input data (Test data) along with their expected output for testing your program. Your test data can be presented in the form of a table as follows (note: feel free to adapt to yourdesign.
• C-code - submit a separate .c or .txt file. Include a screen shot of the successful compilation and execution of yourprogram.
- Make sure you code is documented with header and in-line commentsand isneatly (i.e. indented properly)written
All of these components (except the C-code) should be placed in word (or other acceptable) document for submission.
OPTIONAL: You may choose to do the Pseudo-code instead of the C-code but it is only worth 10pts (meaning the highest possible grade will be a 90). And you must do the Program Design or Flowchart for the Design section.
Suggestion: Do you Analysis and Design first then implement in C in a stepwise fashion.
In other words, implement the loop first, compile, and run. Then implement the next step (i.e. the prompts and input) then compile and run. Save your code at each step so you have something to fall back to.