Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write program that models a college course. Put the declarations for StudentID,

ID: 674816 • Letter: W

Question



Write program that models a college course. Put the declarations for StudentID, Classification, Student. and Course ina header file (e.g. course.h) and the implementation for printRoll in a implemenation file 1. Declare a user-defined type called StudentID that uses an int as its data representation. 2. Declare an enumerated type called Classfication with values for FRESHMAN, SOPHOMORE, JUNIOR, SENIOR, SUPER SENIOR GRADUATE 3. Declare a struct type Student with fields for id:studentID name :string. year Classification, and gpa float 4. Declare a class Course with fields: courseName:string siae:int MAX SIZE: const int roll:Students[MAX SIZEl and a method that prints to cout the id, name and classification of each student one per line printRollo: void 1. Write an implementation of the Course: printRoll() member function

Explanation / Answer

#include<iostream.h>
#include<conio.h>
class student
{
int roll;
char name[100];
char course[100];
public:void getData();
void disp(int r1,int r2)
{
if(roll>=r1 && roll<=r2)
cout<<" roll_no:"<<roll<<" name:"<<name<<" course:"<<course;
}
};
void student::getData()
{
cout<<" Enter roll_no,name and course ";
cin>>roll>>name>>course;
}
void main()
{
student s[100];
int n,r1,r2;
clrscr();
cout<<" Enter no of students ";
cin>>n;
for(int i=0;i<n;i++)
s[i].getData();

cout<<" Enter the range ";

cin>>r1>>r2;
for(int j=0;j<n;j++)
s[j].disp(r1,r2);
getch();
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote