Find Jobs
Hire Freelancers

305512 Programming Project 1237582927

N/A

Færdiggjort
Slået op cirka 15 år siden

N/A

Betales ved levering
Objectives 1. Review use of if statements and loops. 2. Learn how to write functions given specifications. 3. Learn how to use pass by reference variables. 4. Learn how to put together a useful program given a skeleton of that program and the functions and their specifications necessary in the implementation. Problem: Lemonade Stand Last summer your friend has a lemonade stand and made lots of money. You want to do the same! You have plenty of time to plan, so you thought you would be pre pared when summer came around by writing a program to simulate your lemonade stand. The basic idea behind the simulation is as follows: 1) You will simulate 10 days of running the lemonade stand. 2) In the beginning the user gets a $20.00 loan to run the lemonade stand. 3) Before each day, the user gets an opportunity to buy bags of lemons and sugar. 4) At the beginning of each day the user receive a weather report. 5) Based on that, the user is asked to price a cup of lemonade for that day. 6) Then, the days sales are simulated. (Part of this is written for you.) 7) Afterwards, the user is prompted with a status report of how much money they have left and how many bags of lemons and sugar they have left. What you have to do A skeleton of the solution for this assignment is posted on WebCourses and the course web page. Please use this skeleton. You must fill in the seven functions that are left for you to fill in, as well as write the remainder of main so the program works as described above. After you write each function, you should test it before moving on. How to do this will be covered in class. Then, write your main, calling the necessary functions from it to achieve the desired functionality. main can work without declaring any new variables than the ones already declared. But, you may declare new ones if you wish. Perhaps the biggest problem you will have will be not knowing when to make function calls. The goal of having these functions is to make the coding process more manageable. In particular, it is possible that a function might "do" something complicated, but that just really means that function makes calls to other functions that carry out a majority of that work already. In essence, if you write a function A to do a task, then don't write out the code that also does that task in another function B. Instead call the function A from the body of function B. References Textbook: Chapters 9, 10, 11 Notes: Lectures 13, 14, 15, 17 Output Sample Two full output samples of the program running will be provided on Webcourses and the course web page in the files [login to view URL] and lemonade2.out. Deliverables You must submit your solution to the problem, lemonade.c, over WebCourses. Restrictions Although you may use other compilers, your program must compile and run using DevC++. Please use DevC++ to develop your program. Your program should include a header comment with the following information: your name, course number, section number, assignment title, and date. Also, make sure you include ample comments throughout your code describing the major steps in solving the problem. Grading Details Your program will be graded upon the following criteria: 1) Your correctness 2) Your programming style and use of white space. (Even if you have a plan and your program works perfectly, if your programming style is poor or your use of white space is poor you could get 10% or 15% deducted from your grade.) 3) Compatibility to DevC++. (If your program does not compile in this environment, you will get a sizable deduction from your grade, likely to be over 50%) please it has to be in pure c not c++
Projekt-ID: 2051303

Om projektet

1 forslag
Projekt på afstand
Aktiv 12 år siden

Leder du efter muligheder for at tjene penge?

Fordele ved budafgivning på Freelancer

Fastsæt dit budget og din tidsramme
Bliv betalt for dit arbejde
Oprids dit forslag
Det er gratis at skrive sig op og byde på jobs
Tildel til:
Brug Avatar.
Hi, I'm ready to do this for you. I am already starting to work on it. Please consider me.
$14 USD på 0 dag
5,0 (7 anmeldelser)
2,0
2,0

Om klienten

Flag for
5,0
15
Medlem siden okt. 15, 2008

Klientverificering

Tak! Vi har sendt dig en e-mail med et link, så du kan modtage din kredit.
Noget gik galt, da vi forsøgte at sende din mail. Prøv venligst igen.
Registrerede brugere Oprettede jobs i alt
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Indlæser forhåndsvisning
Geolokalisering er tilladt.
Din session er udløbet, og du er blevet logget ud. Log venligst ind igen.