Question
Topic : Write an app to manage a University. Description : A University has People, who have a name and age. Some people are Students,
Topic: Write an app to manage a University.
Description: A University has People, who have a name and age. Some people are Students, who have a number of credits and number of grade points. Some People are Teachers, who have a salary. Some are Librarians, who have a favorite genre (history, adventure, ). A University has Departments, which have Students and Teachers. A University also has a Library, which has many Librarians and many Books, each of which has a title and number of pages. It also has several Clubs, which each have a Teacher advisor and Student members.
Calculate:
- a students GPA: numGradePoints / numCredits
- the total number of pages of all books
- total salary of all teachers
- total number of credits of all students
Compare:
- books to see which is longer, for example if b1 > b2
- teachers to see who earns more, for example if t1 > t2
GUI
- details later, together with Lab 8
Test Data
- make your own
Progress Marks (5):
- some classes, subclasses, print() methods, and test data, with no associations yet
- show 12/13 April
- all Classes with assocations (Uni has Depts, Dept has Teachers, ...)
- show 17/18 April
- some calculations
- show 19/20 April
- all calculations and comparisons
- show 24/25 April
- GUI (we'll do this as part of Lab8)
- show 1/2 May
First Steps:
- draw a UML
- no need for detail (attributes, behaviors, +/-)
- make the classes
- for example:
class University: def __init__(self, n): self.name = n def printUniversity(self): print (self.name, "University") # Main code u = University("Zayed") u.printUniversity()
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