Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started