Write a complete C++ program based on the following tasks: 1. Class Project has the following methods: a. the constructor b. getSupervisor c. setSupervisor 2. Class Student has the following methods: a. the constructor b. setName c. setProject d. assignSupervisor e. print: to display the student's nameand project's title, andalso the supervisor's rame (but only if the student has a supervisor). f. 3. Create two objects of Lecturer for “Dr. Ali Bakar" and "Prof. Dr. Abu Samah Abdullah". 4. Then create an array of objects of Student with a maximum number of students to store into the array is 15. 5. Read a list of students consisting of names and project titles, from an input file and store them into an array. 6. Assign supervisors to students as follows: a. The first lecturer is assigned to be the supervisor for the first and second students. b. The second lecturer is assigned to the last student. 7. Print all the students. The screen output should look like as in Figure 5 and Figure 6.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Question 2
Cons ider the class diagram in Figure 4 which illustrates the data model for supervisions of student
projects. Each student can only have a project and is supervised by a lecturer.
Lecturer
|-name
+Lecturer (n:string)
+getName (): string
Project
-title
+Project ( )
getTitle ():string
+setTitle (t : string) : void
+getSupervisor (): Lecturer
+setSupervisor ( sv:Lecturer" ) :void
Student
-name
+Student ()
+setName (n : string): void
+setProject (t: string ): void
+assignSupervisor (sv : Lecturer ) : void
print (): void
Figure 4: Class diagram for project supervisions
Write a complete C++ program based on the following tasks:
1. Class Project has the following methods:
a. the constructor
b. getsupervisor
c. setSupervisor
2. Class Student has the following methods:
a. the constructor
b. setName
c. setProject
d. assignsupervisor
e. print: to display the student's nameand project's title, andalso the supervisor's name
(but only if the student has a supervisor).
f.
3. Create two objects of Lecturer for “Dr. Ali Bakar" and “Prof. Dr. Abu Samah Abdullah".
4. Then create an array of objec ts of Student with a maximum number of students to store into
the array is 15.
5. Read a list of students consisting of names and project titles, from an input file and store them
into an array.
6. Assign supervis ors to students as follows:
a. The first lecturer is assigned to be the supervisor for the first and second students.
b. The second lecturer is assigned to the last student.
7. Print all the students. The screen output should look like as in Figure 5 and Figure 6.
Transcribed Image Text:Question 2 Cons ider the class diagram in Figure 4 which illustrates the data model for supervisions of student projects. Each student can only have a project and is supervised by a lecturer. Lecturer |-name +Lecturer (n:string) +getName (): string Project -title +Project ( ) getTitle ():string +setTitle (t : string) : void +getSupervisor (): Lecturer +setSupervisor ( sv:Lecturer" ) :void Student -name +Student () +setName (n : string): void +setProject (t: string ): void +assignSupervisor (sv : Lecturer ) : void print (): void Figure 4: Class diagram for project supervisions Write a complete C++ program based on the following tasks: 1. Class Project has the following methods: a. the constructor b. getsupervisor c. setSupervisor 2. Class Student has the following methods: a. the constructor b. setName c. setProject d. assignsupervisor e. print: to display the student's nameand project's title, andalso the supervisor's name (but only if the student has a supervisor). f. 3. Create two objects of Lecturer for “Dr. Ali Bakar" and “Prof. Dr. Abu Samah Abdullah". 4. Then create an array of objec ts of Student with a maximum number of students to store into the array is 15. 5. Read a list of students consisting of names and project titles, from an input file and store them into an array. 6. Assign supervis ors to students as follows: a. The first lecturer is assigned to be the supervisor for the first and second students. b. The second lecturer is assigned to the last student. 7. Print all the students. The screen output should look like as in Figure 5 and Figure 6.
Student
Alina Atan
: Anti-Intrusion System
Project
Supervisor :
Dr. Ali Bakar
: Siti Nurdiana Abdullah
: CCTV-Based Fire Alarm System
Student
Project
Supervisor : Dr. Ali Bakar
: Azrul Malik
: Low Energy Drone
Supervisor : Prof. Dr. Abu Samah Abdullah
Student
Project
Figure 5: Screen output with the input file, student_list1.txt
Student
: Sit Aminah
: Cost-Effective Green Fuel
Project
Supervisor : Dr. Ali Bakar
Student
Kamarul Ariffin
Project
Supervisor : Dr. Ali Bakar
IOT-based Flood Monitoring
: Abdul Jabar
: Energy Saving with IOT
Student
Project
: Kamariah Jalil
: Camera-based Heat Detection
Student
Project
: Seman Abdullah
: Image-based Search Engine
Student
Project
: Rozita Abdul
: Programmer Friendly Metaprogramming
Student
Project
Supervisor : Prof. Dr. Abu Samah Abdullah
Figure 6: Screen output with the input file, student_list2.txt
Transcribed Image Text:Student Alina Atan : Anti-Intrusion System Project Supervisor : Dr. Ali Bakar : Siti Nurdiana Abdullah : CCTV-Based Fire Alarm System Student Project Supervisor : Dr. Ali Bakar : Azrul Malik : Low Energy Drone Supervisor : Prof. Dr. Abu Samah Abdullah Student Project Figure 5: Screen output with the input file, student_list1.txt Student : Sit Aminah : Cost-Effective Green Fuel Project Supervisor : Dr. Ali Bakar Student Kamarul Ariffin Project Supervisor : Dr. Ali Bakar IOT-based Flood Monitoring : Abdul Jabar : Energy Saving with IOT Student Project : Kamariah Jalil : Camera-based Heat Detection Student Project : Seman Abdullah : Image-based Search Engine Student Project : Rozita Abdul : Programmer Friendly Metaprogramming Student Project Supervisor : Prof. Dr. Abu Samah Abdullah Figure 6: Screen output with the input file, student_list2.txt
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 6 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY