SlideShare a Scribd company logo
1 of 6
Download to read offline
*** C++ ***
1.MAIN OBJECTIVE
The goal of this project is to design and implement a university administration system.
The system consists of classes of these types:
Person (Student, Teacher)
Student (B.Sc., M.Sc., Ph.D., ...)
Teacher (lecturer, adjunct, professor, ...),
Course.
Department.
You can have additional classes if required.
2. DESCRIPTION
The system should have these relationships included:
A Person should have the basic information of a person like: university ID, name, birth date, and
gender.
A student can be an undergraduate or graduate student.
A student can enroll in a course.
A graduate student can be a teaching assistant or research assistant.
A teaching assistant can be assigned to a course.
A teacher can be a lecturer, adjunct or professor.
A teacher can be assigned to a course.
Courses can be from undergraduate or graduate level.
Courses should include the grades of all students enrolled in the class.
Each teacher, student or course is assigned to a department.
3. TEST PROGRAM
The program should be tested using auxiliary files.
T eachers.txt
Students.txt
Courses.txt
Departments.txt
Each file should contain instances of the classes in the project.
The input to the system is obtained by reading these text files.
Each file should include enough instances to completely test the system’s flow of events:
Display information about Teachers
Display information about Students
Display information about Courses
Display information about Departments
Solution
/*
* Person.cpp
*
* Created on: 17-Nov-2016
* Author: kasturi
*/
#include
#include
#include
using namespace std;
#define MAX_SIZE 20
class Course
{
private:
string courseName;
int courseID;
float grades[MAX_SIZE][6];
int numofStudents;
public:
Course(int id, string name, int numOfStudents, double grade[6])
{
courseID = id;
courseName = name;
numofStudents = numOfStudents;
}
Course(int id, string name)
{
courseID = id;
courseName = name;
}
Course()
{
numofStudents = 0;
}
void addGrades(double grade[6])
{
for(int i=0; i>id>>name>>g>>courseID>>type>>deptID))
{
break;
} // error
teachers[Teachcounter] = new Teacher(id, name, g, courseID, type, deptID);
Teachcounter++;
}
infile.close();
infile.open("Students.txt");
int stuCounter = 0;
while (getline(infile, line))
{
string name, type;
int id, courseID, deptID;
char g;
bool isUG;
double grades[6];
istringstream iss(line);
if (!(iss
>>id>>name>>g>>type>>courseID>>grades[0]>>grades[1]>>grades[2]>>grades[3]>>grades[4]
>>grades[5]>>deptID))
{
break;
} // error
if(type == "UnderGraduate")
isUG = true;
else isUG = false;
students[stuCounter] = new Student(id, name, g, courseID, isUG, grades, deptID);
stuCounter++;
}
infile.close();
//courses
int courseCount = 0;
infile.open("Courses.txt");
while (getline(infile, line))
{
string name;
int id;
istringstream iss(line);
if (!(iss >>id>>name))
{
break;
} // error
course[courseCount] = new Course(id, name);
courseCount++;
}
infile.close();
//Department
int deptCount = 0;
infile.open("Departments.txt");
while (getline(infile, line))
{
string name;
int id;
istringstream iss(line);
if (!(iss >>name>>id))
{
break;
} // error
department[deptCount] = new Department(name, id);
deptCount++;
}
infile.close();
//Students
cout<<"----Students---- "<printData();
}
//Teachers
cout<<"----Teachers---- "<printData();
}
//courses
cout<printCourse();
}
//Department
cout<printDepartment();
}
return 0;
}
OUTPUT:
----Students----
Name: Henry
ID: 2234
Gender: 77
Department ID: 34223
Student Type: UnderGraduate
Course ID: 1
Grades: 77.000000 78.000000 79.000000 78.000000 81.000000 82.000000
Name: Nina
ID: 2235
Gender: 70
Department ID: 34224
Student Type: UnderGraduate
Course ID: 0
Grades: 77.000000 78.000000 79.000000 78.000000 81.000000 82.000000
Name: Mike
ID: 2236
Gender: 77
Department ID: 34223
Student Type: UnderGraduate
Course ID: 1
Grades: 77.000000 78.000000 79.000000 78.000000 81.000000 85.000000
Name: Mirey
ID: 2237
Gender: 70
Department ID: 34224
Student Type: UnderGraduate
Course ID: 1
Grades: 71.000000 78.000000 72.000000 78.000000 71.000000 85.000000
----Teachers----
Name: Lisa
ID: 1234
Gender: 70
Department ID: 34223
Teaching Type: Professor
Course ID: 4567
Name: Mathew
ID: 1235
Gender: 77
Department ID: 34224
Teaching Type: Adjunct
Course ID: 4567
Name: Phil
ID: 1236
Gender: 77
Department ID: 34223
Teaching Type: Lecturer
Course ID: 4568
----Courses----
Course Name: B.Sc
Course ID: 4567
Course Name: M.Sc
Course ID: 4568
----Department----
Department Name: CSE
Department ID: 34223
Department Name: EEE
Department ID: 34224

More Related Content

Similar to C++ 1.MAIN OBJECTIVEThe goal of this project is to design.pdf

Java căn bản - Chapter13
Java căn bản - Chapter13Java căn bản - Chapter13
Java căn bản - Chapter13Vince Vo
 
Chapter 13 - Inheritance and Polymorphism
Chapter 13 - Inheritance and PolymorphismChapter 13 - Inheritance and Polymorphism
Chapter 13 - Inheritance and PolymorphismEduardo Bergavera
 
Chapter 6 OOP (Revision)
Chapter 6 OOP (Revision)Chapter 6 OOP (Revision)
Chapter 6 OOP (Revision)OUM SAOKOSAL
 
import school.; import school.courses.;public class Main { p.pdf
import school.; import school.courses.;public class Main { p.pdfimport school.; import school.courses.;public class Main { p.pdf
import school.; import school.courses.;public class Main { p.pdfannaiwatertreatment
 
Online courseregistration tolstoy
Online courseregistration   tolstoyOnline courseregistration   tolstoy
Online courseregistration tolstoyHardik Padhy
 
Online courseregistration tolstoy
Online courseregistration   tolstoyOnline courseregistration   tolstoy
Online courseregistration tolstoyyirgalem ameshe
 
chapter-7-classes-and-objects.pdf
chapter-7-classes-and-objects.pdfchapter-7-classes-and-objects.pdf
chapter-7-classes-and-objects.pdfstudy material
 
Chapter 8.3
Chapter 8.3Chapter 8.3
Chapter 8.3sotlsoc
 
c++ lecture 1
c++ lecture 1c++ lecture 1
c++ lecture 1sai kumar
 
c++ lecture 1
c++ lecture 1c++ lecture 1
c++ lecture 1sai kumar
 
c++ introduction
c++ introductionc++ introduction
c++ introductionsai kumar
 
Inheritance (1)
Inheritance (1)Inheritance (1)
Inheritance (1)sanya6900
 
CS4700 Database Management Systems.docx
CS4700 Database Management Systems.docxCS4700 Database Management Systems.docx
CS4700 Database Management Systems.docxwrite31
 
#ifndef COURSES_H #define COURSES_H class Courses { privat.pdf
#ifndef COURSES_H #define COURSES_H class Courses { privat.pdf#ifndef COURSES_H #define COURSES_H class Courses { privat.pdf
#ifndef COURSES_H #define COURSES_H class Courses { privat.pdfanupambedcovers
 
Basic_concepts_of_OOPS_in_Python.pptx
Basic_concepts_of_OOPS_in_Python.pptxBasic_concepts_of_OOPS_in_Python.pptx
Basic_concepts_of_OOPS_in_Python.pptxsantoshkumar811204
 

Similar to C++ 1.MAIN OBJECTIVEThe goal of this project is to design.pdf (20)

Java căn bản - Chapter13
Java căn bản - Chapter13Java căn bản - Chapter13
Java căn bản - Chapter13
 
Chapter 13 - Inheritance and Polymorphism
Chapter 13 - Inheritance and PolymorphismChapter 13 - Inheritance and Polymorphism
Chapter 13 - Inheritance and Polymorphism
 
Chapter 6 OOP (Revision)
Chapter 6 OOP (Revision)Chapter 6 OOP (Revision)
Chapter 6 OOP (Revision)
 
6 class design
6 class design6 class design
6 class design
 
static methods
static methodsstatic methods
static methods
 
import school.; import school.courses.;public class Main { p.pdf
import school.; import school.courses.;public class Main { p.pdfimport school.; import school.courses.;public class Main { p.pdf
import school.; import school.courses.;public class Main { p.pdf
 
OOP_1_TEG
OOP_1_TEGOOP_1_TEG
OOP_1_TEG
 
Online courseregistration tolstoy
Online courseregistration   tolstoyOnline courseregistration   tolstoy
Online courseregistration tolstoy
 
Online courseregistration tolstoy
Online courseregistration   tolstoyOnline courseregistration   tolstoy
Online courseregistration tolstoy
 
chapter-7-classes-and-objects.pdf
chapter-7-classes-and-objects.pdfchapter-7-classes-and-objects.pdf
chapter-7-classes-and-objects.pdf
 
Chapter 8.3
Chapter 8.3Chapter 8.3
Chapter 8.3
 
c++ lecture 1
c++ lecture 1c++ lecture 1
c++ lecture 1
 
c++ lecture 1
c++ lecture 1c++ lecture 1
c++ lecture 1
 
c++ introduction
c++ introductionc++ introduction
c++ introduction
 
Inheritance
InheritanceInheritance
Inheritance
 
Inheritance (1)
Inheritance (1)Inheritance (1)
Inheritance (1)
 
CS4700 Database Management Systems.docx
CS4700 Database Management Systems.docxCS4700 Database Management Systems.docx
CS4700 Database Management Systems.docx
 
#ifndef COURSES_H #define COURSES_H class Courses { privat.pdf
#ifndef COURSES_H #define COURSES_H class Courses { privat.pdf#ifndef COURSES_H #define COURSES_H class Courses { privat.pdf
#ifndef COURSES_H #define COURSES_H class Courses { privat.pdf
 
Basic_concepts_of_OOPS_in_Python.pptx
Basic_concepts_of_OOPS_in_Python.pptxBasic_concepts_of_OOPS_in_Python.pptx
Basic_concepts_of_OOPS_in_Python.pptx
 
Segundo avance
Segundo avanceSegundo avance
Segundo avance
 

More from nishadvtky

Find the complex zeros of the polynomial function. Write f in factor.pdf
Find the complex zeros of the polynomial function. Write f in factor.pdfFind the complex zeros of the polynomial function. Write f in factor.pdf
Find the complex zeros of the polynomial function. Write f in factor.pdfnishadvtky
 
Enzymes are organic molecules that are essential raw materials for a.pdf
Enzymes are organic molecules that  are essential raw materials for a.pdfEnzymes are organic molecules that  are essential raw materials for a.pdf
Enzymes are organic molecules that are essential raw materials for a.pdfnishadvtky
 
Can the peak to peak ripple current, IL, of a inductor be measured .pdf
Can the peak to peak ripple current,  IL, of a inductor be measured .pdfCan the peak to peak ripple current,  IL, of a inductor be measured .pdf
Can the peak to peak ripple current, IL, of a inductor be measured .pdfnishadvtky
 
A statistic is a number describing an aspect of the scores in a samp.pdf
A statistic is a number describing an aspect of the scores in a samp.pdfA statistic is a number describing an aspect of the scores in a samp.pdf
A statistic is a number describing an aspect of the scores in a samp.pdfnishadvtky
 
Angle in standavd position10pi7 =SolutionAn angle is in standa.pdf
Angle in standavd position10pi7 =SolutionAn angle is in standa.pdfAngle in standavd position10pi7 =SolutionAn angle is in standa.pdf
Angle in standavd position10pi7 =SolutionAn angle is in standa.pdfnishadvtky
 
Dada la ecuacion de la conica -6x_1^2 + 20 x_1 x_2 + 8x_2^2 + 30 x_1.pdf
Dada la ecuacion de la conica  -6x_1^2 + 20 x_1 x_2 + 8x_2^2 + 30 x_1.pdfDada la ecuacion de la conica  -6x_1^2 + 20 x_1 x_2 + 8x_2^2 + 30 x_1.pdf
Dada la ecuacion de la conica -6x_1^2 + 20 x_1 x_2 + 8x_2^2 + 30 x_1.pdfnishadvtky
 
Assume that a new oxygen-transport protein has been discovered in ce.pdf
Assume that a new oxygen-transport protein has been discovered in ce.pdfAssume that a new oxygen-transport protein has been discovered in ce.pdf
Assume that a new oxygen-transport protein has been discovered in ce.pdfnishadvtky
 
You are lost in the national park of Bandrika. Tourists comprise 23.pdf
You are lost in the national park of Bandrika. Tourists comprise 23.pdfYou are lost in the national park of Bandrika. Tourists comprise 23.pdf
You are lost in the national park of Bandrika. Tourists comprise 23.pdfnishadvtky
 
Describe in words the phylogenetic relationships among Eusthenoptero.pdf
Describe in words the phylogenetic relationships among Eusthenoptero.pdfDescribe in words the phylogenetic relationships among Eusthenoptero.pdf
Describe in words the phylogenetic relationships among Eusthenoptero.pdfnishadvtky
 
Why do scientists refer to Charles Darwins ideas about evolution a.pdf
Why do scientists refer to Charles Darwins ideas about evolution a.pdfWhy do scientists refer to Charles Darwins ideas about evolution a.pdf
Why do scientists refer to Charles Darwins ideas about evolution a.pdfnishadvtky
 
Which of the following terms refers to the ability to attend to cert.pdf
Which of the following terms refers to the ability to attend to cert.pdfWhich of the following terms refers to the ability to attend to cert.pdf
Which of the following terms refers to the ability to attend to cert.pdfnishadvtky
 
Which system performs better using OFDM to service two different us.pdf
Which system performs better using OFDM to service two different us.pdfWhich system performs better using OFDM to service two different us.pdf
Which system performs better using OFDM to service two different us.pdfnishadvtky
 
Which of the following is a method of reproduction that plants canno.pdf
Which of the following is a method of reproduction that plants canno.pdfWhich of the following is a method of reproduction that plants canno.pdf
Which of the following is a method of reproduction that plants canno.pdfnishadvtky
 
What is an interface How is extending a class different from impl.pdf
What is an interface How is extending a class different from impl.pdfWhat is an interface How is extending a class different from impl.pdf
What is an interface How is extending a class different from impl.pdfnishadvtky
 
Using Windows Batch in command prompt. - Call this programCreate a.pdf
Using Windows Batch in command prompt. - Call this programCreate a.pdfUsing Windows Batch in command prompt. - Call this programCreate a.pdf
Using Windows Batch in command prompt. - Call this programCreate a.pdfnishadvtky
 
what are the consequences of HWE on allele and genotype frequencies.pdf
what are the consequences of HWE on allele and genotype frequencies.pdfwhat are the consequences of HWE on allele and genotype frequencies.pdf
what are the consequences of HWE on allele and genotype frequencies.pdfnishadvtky
 
What are three major operating characteristics of air filtersSo.pdf
What are three major operating characteristics of air filtersSo.pdfWhat are three major operating characteristics of air filtersSo.pdf
What are three major operating characteristics of air filtersSo.pdfnishadvtky
 
What are “nonsense syllables” and what is their importanceSolut.pdf
What are “nonsense syllables” and what is their importanceSolut.pdfWhat are “nonsense syllables” and what is their importanceSolut.pdf
What are “nonsense syllables” and what is their importanceSolut.pdfnishadvtky
 
Three kinds of macromolecules are present in cell membranes. What ar.pdf
Three kinds of macromolecules are present in cell membranes. What ar.pdfThree kinds of macromolecules are present in cell membranes. What ar.pdf
Three kinds of macromolecules are present in cell membranes. What ar.pdfnishadvtky
 
There are five girls and five boys at a party. In how many ways can .pdf
There are five girls and five boys at a party. In how many ways can .pdfThere are five girls and five boys at a party. In how many ways can .pdf
There are five girls and five boys at a party. In how many ways can .pdfnishadvtky
 

More from nishadvtky (20)

Find the complex zeros of the polynomial function. Write f in factor.pdf
Find the complex zeros of the polynomial function. Write f in factor.pdfFind the complex zeros of the polynomial function. Write f in factor.pdf
Find the complex zeros of the polynomial function. Write f in factor.pdf
 
Enzymes are organic molecules that are essential raw materials for a.pdf
Enzymes are organic molecules that  are essential raw materials for a.pdfEnzymes are organic molecules that  are essential raw materials for a.pdf
Enzymes are organic molecules that are essential raw materials for a.pdf
 
Can the peak to peak ripple current, IL, of a inductor be measured .pdf
Can the peak to peak ripple current,  IL, of a inductor be measured .pdfCan the peak to peak ripple current,  IL, of a inductor be measured .pdf
Can the peak to peak ripple current, IL, of a inductor be measured .pdf
 
A statistic is a number describing an aspect of the scores in a samp.pdf
A statistic is a number describing an aspect of the scores in a samp.pdfA statistic is a number describing an aspect of the scores in a samp.pdf
A statistic is a number describing an aspect of the scores in a samp.pdf
 
Angle in standavd position10pi7 =SolutionAn angle is in standa.pdf
Angle in standavd position10pi7 =SolutionAn angle is in standa.pdfAngle in standavd position10pi7 =SolutionAn angle is in standa.pdf
Angle in standavd position10pi7 =SolutionAn angle is in standa.pdf
 
Dada la ecuacion de la conica -6x_1^2 + 20 x_1 x_2 + 8x_2^2 + 30 x_1.pdf
Dada la ecuacion de la conica  -6x_1^2 + 20 x_1 x_2 + 8x_2^2 + 30 x_1.pdfDada la ecuacion de la conica  -6x_1^2 + 20 x_1 x_2 + 8x_2^2 + 30 x_1.pdf
Dada la ecuacion de la conica -6x_1^2 + 20 x_1 x_2 + 8x_2^2 + 30 x_1.pdf
 
Assume that a new oxygen-transport protein has been discovered in ce.pdf
Assume that a new oxygen-transport protein has been discovered in ce.pdfAssume that a new oxygen-transport protein has been discovered in ce.pdf
Assume that a new oxygen-transport protein has been discovered in ce.pdf
 
You are lost in the national park of Bandrika. Tourists comprise 23.pdf
You are lost in the national park of Bandrika. Tourists comprise 23.pdfYou are lost in the national park of Bandrika. Tourists comprise 23.pdf
You are lost in the national park of Bandrika. Tourists comprise 23.pdf
 
Describe in words the phylogenetic relationships among Eusthenoptero.pdf
Describe in words the phylogenetic relationships among Eusthenoptero.pdfDescribe in words the phylogenetic relationships among Eusthenoptero.pdf
Describe in words the phylogenetic relationships among Eusthenoptero.pdf
 
Why do scientists refer to Charles Darwins ideas about evolution a.pdf
Why do scientists refer to Charles Darwins ideas about evolution a.pdfWhy do scientists refer to Charles Darwins ideas about evolution a.pdf
Why do scientists refer to Charles Darwins ideas about evolution a.pdf
 
Which of the following terms refers to the ability to attend to cert.pdf
Which of the following terms refers to the ability to attend to cert.pdfWhich of the following terms refers to the ability to attend to cert.pdf
Which of the following terms refers to the ability to attend to cert.pdf
 
Which system performs better using OFDM to service two different us.pdf
Which system performs better using OFDM to service two different us.pdfWhich system performs better using OFDM to service two different us.pdf
Which system performs better using OFDM to service two different us.pdf
 
Which of the following is a method of reproduction that plants canno.pdf
Which of the following is a method of reproduction that plants canno.pdfWhich of the following is a method of reproduction that plants canno.pdf
Which of the following is a method of reproduction that plants canno.pdf
 
What is an interface How is extending a class different from impl.pdf
What is an interface How is extending a class different from impl.pdfWhat is an interface How is extending a class different from impl.pdf
What is an interface How is extending a class different from impl.pdf
 
Using Windows Batch in command prompt. - Call this programCreate a.pdf
Using Windows Batch in command prompt. - Call this programCreate a.pdfUsing Windows Batch in command prompt. - Call this programCreate a.pdf
Using Windows Batch in command prompt. - Call this programCreate a.pdf
 
what are the consequences of HWE on allele and genotype frequencies.pdf
what are the consequences of HWE on allele and genotype frequencies.pdfwhat are the consequences of HWE on allele and genotype frequencies.pdf
what are the consequences of HWE on allele and genotype frequencies.pdf
 
What are three major operating characteristics of air filtersSo.pdf
What are three major operating characteristics of air filtersSo.pdfWhat are three major operating characteristics of air filtersSo.pdf
What are three major operating characteristics of air filtersSo.pdf
 
What are “nonsense syllables” and what is their importanceSolut.pdf
What are “nonsense syllables” and what is their importanceSolut.pdfWhat are “nonsense syllables” and what is their importanceSolut.pdf
What are “nonsense syllables” and what is their importanceSolut.pdf
 
Three kinds of macromolecules are present in cell membranes. What ar.pdf
Three kinds of macromolecules are present in cell membranes. What ar.pdfThree kinds of macromolecules are present in cell membranes. What ar.pdf
Three kinds of macromolecules are present in cell membranes. What ar.pdf
 
There are five girls and five boys at a party. In how many ways can .pdf
There are five girls and five boys at a party. In how many ways can .pdfThere are five girls and five boys at a party. In how many ways can .pdf
There are five girls and five boys at a party. In how many ways can .pdf
 

Recently uploaded

How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 

Recently uploaded (20)

How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 

C++ 1.MAIN OBJECTIVEThe goal of this project is to design.pdf

  • 1. *** C++ *** 1.MAIN OBJECTIVE The goal of this project is to design and implement a university administration system. The system consists of classes of these types: Person (Student, Teacher) Student (B.Sc., M.Sc., Ph.D., ...) Teacher (lecturer, adjunct, professor, ...), Course. Department. You can have additional classes if required. 2. DESCRIPTION The system should have these relationships included: A Person should have the basic information of a person like: university ID, name, birth date, and gender. A student can be an undergraduate or graduate student. A student can enroll in a course. A graduate student can be a teaching assistant or research assistant. A teaching assistant can be assigned to a course. A teacher can be a lecturer, adjunct or professor. A teacher can be assigned to a course. Courses can be from undergraduate or graduate level. Courses should include the grades of all students enrolled in the class. Each teacher, student or course is assigned to a department. 3. TEST PROGRAM The program should be tested using auxiliary files. T eachers.txt Students.txt Courses.txt Departments.txt Each file should contain instances of the classes in the project. The input to the system is obtained by reading these text files. Each file should include enough instances to completely test the system’s flow of events: Display information about Teachers Display information about Students Display information about Courses
  • 2. Display information about Departments Solution /* * Person.cpp * * Created on: 17-Nov-2016 * Author: kasturi */ #include #include #include using namespace std; #define MAX_SIZE 20 class Course { private: string courseName; int courseID; float grades[MAX_SIZE][6]; int numofStudents; public: Course(int id, string name, int numOfStudents, double grade[6]) { courseID = id; courseName = name; numofStudents = numOfStudents; } Course(int id, string name) { courseID = id; courseName = name; } Course() {
  • 3. numofStudents = 0; } void addGrades(double grade[6]) { for(int i=0; i>id>>name>>g>>courseID>>type>>deptID)) { break; } // error teachers[Teachcounter] = new Teacher(id, name, g, courseID, type, deptID); Teachcounter++; } infile.close(); infile.open("Students.txt"); int stuCounter = 0; while (getline(infile, line)) { string name, type; int id, courseID, deptID; char g; bool isUG; double grades[6]; istringstream iss(line); if (!(iss >>id>>name>>g>>type>>courseID>>grades[0]>>grades[1]>>grades[2]>>grades[3]>>grades[4] >>grades[5]>>deptID)) { break; } // error if(type == "UnderGraduate") isUG = true; else isUG = false; students[stuCounter] = new Student(id, name, g, courseID, isUG, grades, deptID); stuCounter++; } infile.close(); //courses
  • 4. int courseCount = 0; infile.open("Courses.txt"); while (getline(infile, line)) { string name; int id; istringstream iss(line); if (!(iss >>id>>name)) { break; } // error course[courseCount] = new Course(id, name); courseCount++; } infile.close(); //Department int deptCount = 0; infile.open("Departments.txt"); while (getline(infile, line)) { string name; int id; istringstream iss(line); if (!(iss >>name>>id)) { break; } // error department[deptCount] = new Department(name, id); deptCount++; } infile.close(); //Students cout<<"----Students---- "<printData(); } //Teachers cout<<"----Teachers---- "<printData();
  • 5. } //courses cout<printCourse(); } //Department cout<printDepartment(); } return 0; } OUTPUT: ----Students---- Name: Henry ID: 2234 Gender: 77 Department ID: 34223 Student Type: UnderGraduate Course ID: 1 Grades: 77.000000 78.000000 79.000000 78.000000 81.000000 82.000000 Name: Nina ID: 2235 Gender: 70 Department ID: 34224 Student Type: UnderGraduate Course ID: 0 Grades: 77.000000 78.000000 79.000000 78.000000 81.000000 82.000000 Name: Mike ID: 2236 Gender: 77 Department ID: 34223 Student Type: UnderGraduate Course ID: 1 Grades: 77.000000 78.000000 79.000000 78.000000 81.000000 85.000000 Name: Mirey ID: 2237 Gender: 70 Department ID: 34224
  • 6. Student Type: UnderGraduate Course ID: 1 Grades: 71.000000 78.000000 72.000000 78.000000 71.000000 85.000000 ----Teachers---- Name: Lisa ID: 1234 Gender: 70 Department ID: 34223 Teaching Type: Professor Course ID: 4567 Name: Mathew ID: 1235 Gender: 77 Department ID: 34224 Teaching Type: Adjunct Course ID: 4567 Name: Phil ID: 1236 Gender: 77 Department ID: 34223 Teaching Type: Lecturer Course ID: 4568 ----Courses---- Course Name: B.Sc Course ID: 4567 Course Name: M.Sc Course ID: 4568 ----Department---- Department Name: CSE Department ID: 34223 Department Name: EEE Department ID: 34224