728x90 AdSpace

Latest Article

Programming Assignment Student and Course Class in C C++ & java





Programming Assignment Homework or lab task for create a  Student and Course Class in C C++ & java 

Student

Create a class Student with the following data members:
• Roll number
• GPA
• Credit hours

Your class should a display method.

Overload the following operators in your class:
• Greater than (>): student1 is considered to be "greater than" a student2 if student1 has a higher GPA than student2. If their GPAs are equal, then the student who has more credit hours is considered to be "greater". (Assume that there will be no case where both GPAs and credit hours are equal.)
• Greater than (<): student1 is considered to be "less than" a student2 if student1 has a lower GPA than student2. If their GPAs are equal, then the student who has fewer credit hours is considered to be "lesser than" the other student. (Assume thatthere will be no case where both GPAs and credit hours are equal.)

Course

Create a class Course with the following data members:

• Name of the course
• An array of the Students enrolled in the course. This array must be dynamically allocated.
• Number of students enrolled in the course. Assume that, at most, 10 students will be enrolled in one course

Your class should include the following methods:
• Constructors
• Destructor
• Copy constructor
• A method to add a new student to the course.
• A method to sort the array of students in ascending order.
• A method to sort the array of students in descending order.
• Display method

Note: To sort the array, use the overloaded operators in the Student class together with the
sorting algorithm provided to you in Assignment 3.
Write a main function to test your classes.

no image
  • Title : Programming Assignment Student and Course Class in C C++ & java
  • Posted by :
  • Date : 03:52
  • Labels :





  • Blogger Comments
  • Facebook Comments

0 comments:

Post a Comment

Top