Question: write a simple SWIFT program that does the following: (1) create a course struct that has course name, semester (for example Spring 2020), and grade.
write a simple SWIFT program that does the following:
(1) create a course struct that has course name, semester (for example Spring
2020), and grade.
(2) create a student class that has student id, student name, list of courses (list
of the struct course), and level.
(3) Level is an enum that can be Undergrad, Grad, and Audit.
(4) The student class must have an initializer with student, student name, and level
The student class will have 2 function:
(5) addCourse
(6) listCourses (function will loop through the list of courses and display course name,
semester, and Grade)
(7) Create a static function that add instances of student class to a list of students.
(8) Create a static function that loops through the list of students and lists the students by
their level that is, you will produce 3 lists: Undergrad list, Grad list, and Audit List
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
