Answered step by step
Verified Expert Solution
Question
1 Approved Answer
you did (a) part but not the second part and can you please do it in visual studio. 1. Each of your programs for parts
you did (a) part but not the second part and can you please do it in visual studio.
1. Each of your programs for parts a and b (below) must use one or more C++ classes. Classes can have functions. However, outside a class only the main function may be created. All variables must be local. Any C++ classes you create must not have any public data members. a. 17 points) Create a game using Co-object-oriented programming. The game is played as follows. The player throws two discs on a two-dimensional grid. The grid is 10 by 10. The player wins if the discs overlap. The discs must be thrown randomly. Assume when a disc is thrown, its center is always on integer coordinates. For example, a center may be at (2,4), where 2 is the coordinate and 4 is the y-coordinate. Your program prompts the user to specify the radius of the first disc and then the radius of the second disc. The discs are represented by objects. Then your program prompts the user to throw the discs. Finally, the program displays the radii of the two discs, their center coordinates, and whether the user won the game or not. b. [3 points) Create a C++ program to keep track of student academic performance. Assume that each student has taken five courses in the semester. Your program needs to: 1. Prompt the user to enter the number of students in the class, 2. For each student, prompt the user to enter the first and last names, grades and hours for five courses 3. Display the first and last names of each student along with their spa. Use the following formula for calculating spa: Gpa = ((gradePoints* hours)/(3hours) In the formula above, gradePoints refers to grade points received in a course and hours refers to hours for that course. For example, for PROG1960, the hours would equal to 3 and grade points will depend on the grade received. For this program, use the following table to find grade points corresponding to a received grade: Grade Grade Points B 3.0 C 20 10 FO For example, if you wanted to find spa for two courses in which grades were 'A' and 'B' respectively and hours were 5 and 4 respectively, the gpa would be (4.0*5)+(3.0*4)/15+4)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started