01 Jul Create 3 c++ modules
Question Description
1) Module 1: Avg Grade calculator .
The University needs to keep a record of the student grades. This module must do the following:
Ask you to introduce the numeric grades (0-100 integer) of every test (1-3) of every student(1-2) of every class(1-2).
In the case the user enter 3 tests, 2 classrooms and 2 students:
Classroom 1 Introduce grade 1 of student 1:
Classroom 1 Introduce grade 2 of student 1:
Classroom 1 Introduce grade 3 of student 1:
Classroom 1 Introduce grade 1 of student 2:
Classroom 1 Introduce grade 2 of student 2:
Classroom 1 Introduce grade 3 of student 2:
Classroom 2 Introduce grade 1 of student 1:
Classroom 2 Introduce grade 2 of student 1:
Classroom 2 Introduce grade 3 of student 1:
Classroom 2 Introduce grade 1 of student 2:
Classroom 2 Introduce grade 2 of student 2:
Classroom 2 Introduce grade 3 of student 2:
Calculate average grade per student, per classroom and the average grade of the institution and display the results.
Used a triple nested loop to build the program
Output the results: Avg grade od student one xx.xx Avg grade od student 2 xx.xx….. …. Avg of class 1 xx, avg of class 2 xx.xx…. , avg of the University xx.xx to a file Gradesinfo.txt.
2) Module2 : Book store
It must uses the “if else if statement” to do the following:
Ask the user how much money is willing to spend.
Display the available products the user can buy with the amount they input. They only have 4 products.
The products are: Comic $1, Sport journal 2$, Science book 15$, Novel 10$.
The program should say: “With that amount you can buy “(list of products) “
For example
If the user enters 10, then the program should say: You can buy, Comic $1 or Sport journal $2 or a Novel $10 .
3) Module 3: University Lowest grade
Calculate the lowest grade of all. You will need to create an input file with all the grades of the university (12 grades ) to complete the module;
The file should be called grades.txt. This file does not need to be the file created in module 2.
Example of file grades.txt:
96
45
67
56
78
89
… (Try with 12 random numbers in the file)
Remember to create a loop that opens the input file and process the information. It should return the lowest grade of the university i.e. the lowest value of the file.
The main function should use the switch operator to display a menu with 3 choices.
Switch (choice) cases:
Grade calculator
Book store
University lowest grade
Every module should be implemented with a function.
In case choice=1 ask the user for number of classrooms(1-2) , students per classroom (1-2) and scores per student (1-3) , then execute grade_calculator (cls,stu,score) with 3 arguments.
if choice=2 ask how much money are you willing to spend , then run function bookstore(money) with one arguments.
if choice=3 then run the lowest_grade() function.
Clear comments and a readable program are important for the grade of the project.
Our website has a team of professional writers who can help you write any of your homework. They will write your papers from scratch. We also have a team of editors just to make sure all papers are of HIGH QUALITY & PLAGIARISM FREE. To make an Order you only need to click Ask A Question and we will direct you to our Order Page at WriteDemy. Then fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.
Fill in all the assignment paper details that are required in the order form with the standard information being the page count, deadline, academic level and type of paper. It is advisable to have this information at hand so that you can quickly fill in the necessary information needed in the form for the essay writer to be immediately assigned to your writing project. Make payment for the custom essay order to enable us to assign a suitable writer to your order. Payments are made through Paypal on a secured billing page. Finally, sit back and relax.
About Writedemy
We are a professional paper writing website. If you have searched a question and bumped into our website just know you are in the right place to get help in your coursework. We offer HIGH QUALITY & PLAGIARISM FREE Papers.
How It Works
To make an Order you only need to click on “Order Now” and we will direct you to our Order Page. Fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.
Are there Discounts?
All new clients are eligible for 20% off in their first Order. Our payment method is safe and secure.