Question: Introduction to C++ Programming Language Winter 2019 Project 01 50 points Due 03/19/2019 (11:45 A.M.) The goal of this Project is: 1. Being able to

Introduction to C++ Programming Language Winter 2019 Project 01 50 points Due 03/19/2019 (11:45 A.M.) The goal of this Project is: 1. Being able to Analyze, Design, implement, and test a practical real-world application. 2. Being able to use selections and repetition structures 3. Being able to deal with Functions 4. Being able to read and write to files. Requirements: In a word file: o Analyze each problem; outline the problem and its solution requirements. (Describe the problem including input and output in your own words.) o Design an algorithm to solve the problem. (Describe the major steps for solving the problem.) Using visual Studio C++ 2017 software, implement the algorithm in C++. Test the code for each problem and verify that the algorithm works; include a screenshot of each program output. Restrictions: You must work individually. Use only material from class or from the text book (chapters 1- 6). All code must be the work of the individual. Do not share your code or copy from external resources. Submission Create an empty folder; name the folder Project 01 (your name); include all files in a folder; compress the folder and upload it to the Canvas by the due date. DO NOT Email your files. Grading: The grade of each program will be based on the creation of a program that works correctly, up to some details (50%), clear problem analysis and algorithm design (5%), the appropriate use of functions and loops (25%), the production of clear output, with readable formatting and without unnecessary repetition (10%), composition of informative comments (5%), and testing the program with different inputs (5%). Programs must compile. Coffee Shop (50 points) Jason opened a coffee shop at the beach and sells coffee in three sizes: small (9oz), medium (12oz), and large (15oz). The cost of one small cup is $1.75, one medium cup is $1.90, and one large cup is $2.00. Write a menu-driven program that will make the coffee shop operational. Your program should allow the user to do the following: a. Buy coffee in any size and in any number of cups. b. At any time show the total number of cups of each size sold. c. At any time show the total amount of coffee sold. d. At any time show the total money made. Your program should consist of at least the following functions: a function to show the user how to use the program, a function to sell coffee, a function to show the number of cups of each size sold, a function to show the total amount of coffee sold, and a function to show the total money made. Your program should not use any global variables and special values such as coffee cup sizes and cost of a coffee cup must be declared as named constants. Sample Output 1: Enter 1 to order coffee. 2: Enter 2 to check the total money made up to this time. 3: Enter 3 to check the total amount of coffee sold up to this time. 4: Enter 4 to check the number of cups of coffee of each size sold. 5: Enter 5 to print the data. 9: Enter 9 to exit the program. 1 1: Enter 1 to buy coffee in a small cup size (9 oz) 2: Enter 2 to buy coffee in a medium cup size (12 oz) 3: Enter 3 to buy coffee in a large cup size (15 oz) 9: Enter 9 to exit. 3 Enter the number of cups: 2 1: Enter 1 to buy coffee in a small cup size (9 oz) 2: Enter 2 to buy coffee in a medium cup size (12 oz) 3: Enter 3 to buy coffee in a large cup size (15 oz) 9: Enter 9 to exit. 9 Please pay $4.00 1: Enter 1 to order coffee. 2: Enter 2 to check the total money made up to this time. 3: Enter 3 to check the total amount of coffee sold up to this time. 4: Enter 4 to check the number of cups of coffee of each size sold. 5: Enter 5 to print the data. 9: Enter 9 to exit the program. 2 Total money made: $4.00 1: Enter 1 to order coffee. 2: Enter 2 to check the total money made up to this time. 3: Enter 3 to check the total amount of coffee sold up to this time. 4: Enter 4 to check the number of cups of coffee of each size sold. 5: Enter 5 to print the data. 9: Enter 9 to exit the program. 3 Total amount of coffee sold: 30oz 1: Enter 1 to order coffee. 2: Enter 2 to check the total money made up to this time. 3: Enter 3 to check the total amount of coffee sold up to this time. 4: Enter 4 to check the number of cups of coffee of each size sold. 5: Enter 5 to print the data. 9: Enter 9 to exit the program. 4 Small cup count: 0 Medium cup count: 0 Large cup count: 2 1: Enter 1 to order coffee. 2: Enter 2 to check the total money made up to this time. 3: Enter 3 to check the total amount of coffee sold up to this time. 4: Enter 4 to check the number of cups of coffee of each size sold. 5: Enter 5 to print the data. 9: Enter 9 to exit the program. 5 Small cup count: 0 Medium cup count: 0 Large cup count: 2 Total amount of coffee sold: 30oz Total money made: $4.00 1: Enter 1 to order coffee. 2: Enter 2 to check the total money made up to this time. 3: Enter 3 to check the total amount of coffee sold up to this time. 4: Enter 4 to check the number of cups of coffee of each size sold. 5: Enter 5 to print the data. 9: Enter 9 to exit the program. 9 Press any key to continue . . . Extra Credit (25 points) For research purposes and to better help students, the admissions office of your local university wants to know how well female and male students perform in certain courses. You receive a file (ECPart1Data.txt) that contains female and male student GPAs for certain courses. Due to confidentiality, the letter code f is used for female students and m for male students. Every file entry consists of a letter code followed by a GPA. Each line has one entry. The number of entries in the file is unknown. Write a program that computes and outputs the average GPA for both female and male students. Format your results to two decimal places. Your program should use the following functions: a. Function openFiles: This function opens the input and output files, and sets the output of the floating-point numbers to two decimal places in a fixed decimal format with a decimal point and trailing zeros. b. Function initialize: This function initializes variables such as countFemale, countMale, sumFemaleGPA, and sumMaleGPA. c. Function sumGrades: This function finds the sum of the female and male students GPAs. d. Function averageGrade: This function finds the average GPA for female and male students. e. Function printResults: This function outputs the relevant results. f. There can be no global variables. Use the appropriate parameters to pass information in and out of functions. Sample Output Processing grades. f 3.40 f 4.00 m 3.56 m 3.80 f 2.30 f 3.95 m 3.90 m 4.00 m 2.00 f 4.00 f 2.80 m 3.70 m 2.98 f 3.89 m 4.00 f 3.90 m 1.90 m 2.90 f 1.50 f 2.67 m 3.80 m 2.35 f 2.90 f 3.70 f 4.00 m 3.78 m 4.00 f 3.98 Sum female GPA = 46.99 Sum male GPA = 46.67 Female count = 14 Male count = 14 Average female GPA = 3.36 Average male GPA = 3.3

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!