Ask C/C++ Expert


Home >> C/C++

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.

C/C++, Programming

  • Category:- C/C++
  • Reference No.:- M91988482

Have any Question?


Related Questions in C/C++

Question 1find the minimum and maximum of a list of numbers

Question: 1. Find the Minimum and Maximum of a List of Numbers: 10 points File: find_min_max.cpp Write a program that reads some number of integers from the user and finds the minimum and maximum numbers in this list. Th ...

Software development fundamentals assignment 1 -details amp

Software Development Fundamentals Assignment 1 - Details & Problems - In this assignment, you are required to answer the short questions, identify error in the code, give output of the code and develop three C# Console P ...

What are the legal requirements with which websites must

What are the legal requirements with which websites must comply in order to meet the needs of persons with disabilities? Why is maximizing accessibility important to everyone?

There are several ways to calculate the pulse width of a

There are several ways to calculate the pulse width of a digital input signal. One method is to directly read the input pin and another method (more efficient) is to use a timer and pin change interrupt. Function startTi ...

Assignment word matchingwhats a six-letter word that has an

Assignment: Word Matching What's a six-letter word that has an e as its first, third, and fifth letter? Can you find an anagram of pine grave. Or how about a word that starts and ends with ant (other than ant itself, of ...

1 implement the binary search tree bst in c using the node

1. Implement the Binary Search Tree (BST) in C++, using the Node class template provided below. Please read the provided helper methods in class BST, especially for deleteValue(), make sure you get a fully understanding ...

Assign ment - genetic algorithmin this assignment you will

ASSIGN MENT - GENETIC ALGORITHM In this assignment, you will use your C programming skills to build a simple Genetic Algorithm. DESCRIPTION OF THE PROGRAM - CORE REQUIREMENTS - REQ1: Command-line arguments The user of yo ...

Project - space race part a console Project - Space Race Part A: Console Implementation

Project - Space Race Part A: Console Implementation INTRODUCTION This assignment aims to give you a real problem-solving experience, similar to what you might encounter in the workplace. You have been hired to complete a ...

Why do researcher drop the ewaste and where does it end

Why do researcher drop the ewaste and where does it end up?

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As