Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

c++ coding This assignment consists of three exercises. You should submit your code in five files on the e-learning: two header file (h) for two

c++ coding image text in transcribed
image text in transcribed
This assignment consists of three exercises. You should submit your code in five files on the e-learning: two header file (h) for two classes, three CPP source files (.cpp) for classes implementation and the main function. Also, in your header file, you must prevent multiple file inclusion. Your code should use separate implementation of the class. Exercise 1 - Define Participant Class Exercise Objectives Define class Problem Description You will develop the one header file (participent.h) and one CPP source file (participent.cpp) in this exercise. Define and implement a class called student contains: Three private variables: noOfHour (int), gpa (int), and name (string). You should ensure that both noOfHour and grade greater than 15 and 60, respectively. Default and parametrized constructor. One destructor. Getter and setter functions. Exercise 2 - Define Certificate Class Exercise Objectives Define class certificate Problem Description -CID: const int You are supposed to declare and implement major:string certificate class as follows: -name: string A class called certificate (as shown in the class noofparint diagram) contains: - *participent[]: participent Member variables to store the certificate + certificate(string name, string major) ID (int), major (String), name (String), the + certificate (course & c) number of participants that register in this certificate() certificate and which participants are they. + SetParti ( parts ( participent, int noOfP): void Note that the number of participants is getmajor():string unknown and can vary from certificate to getName(): string another. ID variable should be constant getNoP(); int and automatically increase starting by + setMajor(): void 500. Such as first object's id is 500, second setName(): void object id is 501...and so on. + setNoP():void A certificate class constructor that receives name and major. o Copy constructor. A member function SetParticipants() which sets the participants for certificate according to received array of participants. Note that this function can be used to change the participants as well. A Destructor for certificate Class. Setters and getters for major, name, and number of participants. Make all getters constant functions. A friend function float GetAvgGrade (course &c) that returns the average of all participants' grade in a certificate Exercise 3 - Implement Main Exercise Objectives Declare objects Use constructor and destructor Problem Description Write the main function: Create an array of 3 students called PHPCert (Ali, Maria, and Mira) with NumofHours (15, 20, 15). and Grade (90, 65, 91). Create an array of 4 students called Marketing Cert (Maher, sally, and tala, Ahmad) with NumofHours (20,40,17,15), and Grade (80, 84, 95,93). Participant PHPCert[3]-{{"Ali", 15,90},{"Maria",20,91), ("Mira",15,91}); Participant MarketingCert(4)-{{"Maher",20,80},{"sally",40,84), ("tala",17,95), ("Ahmad", 15,95}); Create two certificate objects (PHP, and Marketing). Set the major and name of PHP to "cs" and "php". Set the major and name of Marketing to "Business" and "marketing". Set the PHPCert to the PHP, and Marketing Cert to the Marketing Print out the average grade of participants of each certificate. Write the code to ask the user of how many students he/she want to register, then create an array of participants based on his input and let him/her fill their information. Replace the participants in Marketing, with the participants entered by user in the previous step

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions