80 likes | 219 Views
Workshop / Exercises. Lecture 9 Summary, Exercises. Summary. Chapter 1-6 core of SD course Are general for most OO Programming Languages Additional features are listed in the rest of the book, are covered in the upcoming lectures.
E N D
Workshop / Exercises Lecture 9 Summary, Exercises Aalborg Media Lab
Summary • Chapter 1-6 core of SD course • Are general for most OO Programming Languages • Additional features are listed in the rest of the book, are covered in the upcoming lectures. • Two lectures have no content yet, any suggestions?project relevant topics, (game? ) Aalborg Media Lab
Leap Year Exercises • Design an application that reads integer values and determines if the integer corresponds to a leap year. A leap year is divisible by 4, unless it is divisible by 100 but not 400. The entered number must be greater than 1582. Aalborg Media Lab
Leap Year Truth-Table if( year % 4 == 0 && year % 4 != 0 || year % 400 == 0) Aalborg Media Lab
Course Exercises • Design an implement a class called course that represents a course taken at school. Use the student class from book. The course class should contain an addStudent method and a roll method for printing all students attending to the course. Aalborg Media Lab
Address -streetAddress: String -city: String -state: String -zipCode: long + toString(): String Student -firstName: String -lastName: String -homeAddress: Address -schoolAdrees: Address -testScore: int Course -name: String -studentList: String -scoreAverage: double -noStudents: int + toString(): String + toString(): String + roll(): + addStudent(Student): + getAverageScore(): int Aalborg Media Lab
Exercises so far Aalborg Media Lab