Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

c++ Objectives: . Practicing Structs Basic practice on classes. Exercise Out of Mark 1 10 210 Marking scheme Each exercise will be marked as shown

c++ image text in transcribed
image text in transcribed
Objectives: . Practicing Structs Basic practice on classes. Exercise Out of Mark 1 10 210 Marking scheme Each exercise will be marked as shown above. The aspects considered are mentioned in the table below out of 10. (The teaching assistant will mark each exercise proportionally). Anment Him Code correctness medianity, Sa-time Wool Narayan Com Max Marie 5 13 1 1 Oprema 1 TUTUL 10 Integrity Statement: Read carefully! Strict directives have been given to the assistants who will be marking this homework as a departmental policy is being developed on cheating. Any student caught in any form of cheating will be given zero (O) the first time. (We will not get into the issue of who copied from whom!!!). If such an act reoccurs, the case will be sent to the Student Discipline Committee. Submit this cover page with your assignment and sign here that you have read and understood this "Integrity Statement" paragraph. Define a struct called Course that has the components code, title, grade (of type string), credit, and cost of type integer). Define a struct called Finance that has the components type (of type string), and amount (of type integer). Define a class called Student that has private members id, name, numberOfCourses, the array listo/Courses[30] of struct variables of type Course, numberOfFinances of type integer, the array listOfFinances[5] of struct variables of type Finance, and GPA of type float. The class also has the public members ser(string, string), print(), calculateGPAO, find Finance(), and a default parameterised constructor with default values "12345678" and "Omar Ali" as the student id and name. To calculate the tuition fees of each course, multiply the number of credits by the cost of that course. the array listOfFinances[5] of struct variables of type Finance, and GPA of type float. The class also has the public members ser(string, string).print(), calculate GPAO. findFinance), and a default parameterized constructor with default values "12345678" and "Omar Ali" as the student id and name To calculate the tuition fees of each course, multiply the number of credits by the cost of that course. Save the two structs and the class definitions in the file Student.h Implement the member functions of the class in the file Studentimp.cpp Save the following driver in the file Student.cpp int main() Student one; one print(); one_set("87654321". "Ali Omar"); one printo: return 0; reading the following data from the files Courses.txt and Finance.txt Course 1501116 Programming 1501211 Programming 11 150111 Data Structures, 1501265 Advanced Data Systems, F. Expenditures 3500 B 3 910 commedia 5400 DE 3.900 Medical 300 3950 produces the following output: 87654321 Ali Omar toke the following courses: 1501116 Programming 4 890 1501211 Programming II 3 910 1501115 Data Structures 3 900 1501365 Advanced Database Systems 3 950 The GPA was 2.26923 at a cost 21040 dirham 2/2 Objectives: . Practicing Structs Basic practice on classes. Exercise Out of Mark 1 10 210 Marking scheme Each exercise will be marked as shown above. The aspects considered are mentioned in the table below out of 10. (The teaching assistant will mark each exercise proportionally). Anment Him Code correctness medianity, Sa-time Wool Narayan Com Max Marie 5 13 1 1 Oprema 1 TUTUL 10 Integrity Statement: Read carefully! Strict directives have been given to the assistants who will be marking this homework as a departmental policy is being developed on cheating. Any student caught in any form of cheating will be given zero (O) the first time. (We will not get into the issue of who copied from whom!!!). If such an act reoccurs, the case will be sent to the Student Discipline Committee. Submit this cover page with your assignment and sign here that you have read and understood this "Integrity Statement" paragraph. Define a struct called Course that has the components code, title, grade (of type string), credit, and cost of type integer). Define a struct called Finance that has the components type (of type string), and amount (of type integer). Define a class called Student that has private members id, name, numberOfCourses, the array listo/Courses[30] of struct variables of type Course, numberOfFinances of type integer, the array listOfFinances[5] of struct variables of type Finance, and GPA of type float. The class also has the public members ser(string, string), print(), calculateGPAO, find Finance(), and a default parameterised constructor with default values "12345678" and "Omar Ali" as the student id and name. To calculate the tuition fees of each course, multiply the number of credits by the cost of that course. the array listOfFinances[5] of struct variables of type Finance, and GPA of type float. The class also has the public members ser(string, string).print(), calculate GPAO. findFinance), and a default parameterized constructor with default values "12345678" and "Omar Ali" as the student id and name To calculate the tuition fees of each course, multiply the number of credits by the cost of that course. Save the two structs and the class definitions in the file Student.h Implement the member functions of the class in the file Studentimp.cpp Save the following driver in the file Student.cpp int main() Student one; one print(); one_set("87654321". "Ali Omar"); one printo: return 0; reading the following data from the files Courses.txt and Finance.txt Course 1501116 Programming 1501211 Programming 11 150111 Data Structures, 1501265 Advanced Data Systems, F. Expenditures 3500 B 3 910 commedia 5400 DE 3.900 Medical 300 3950 produces the following output: 87654321 Ali Omar toke the following courses: 1501116 Programming 4 890 1501211 Programming II 3 910 1501115 Data Structures 3 900 1501365 Advanced Database Systems 3 950 The GPA was 2.26923 at a cost 21040 dirham 2/2

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

SQL Database Programming

Authors: Chris Fehily

1st Edition

1937842312, 978-1937842314

More Books

Students also viewed these Databases questions

Question

What are Decision Trees?

Answered: 1 week ago

Question

What is meant by the Term Glass Ceiling?

Answered: 1 week ago