create 3 c modules
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.
Need your ASSIGNMENT done? Use our paper writing service to score good grades and meet your deadlines.
Order a Similar Paper Order a Different Paper