Question: Write a python program with the following specifications. University Class University has three instance variables name (String), enrollment (int), and urban (boolean) University has an
Write a python program with the following specifications.
University Class | University has three instance variables name (String), enrollment (int), and urban (boolean) University has an init method that initializes name, enrollment, and urban University has proper set and get methods for the data members. The set method for enrollment ensure that the user cannot set a negative enrollment or anything larger than 200,000 |
TSU Class | TSU inherits from University TSU has two additional instance variables location (String), and numberOfCampuses (int) TSU has an init method with proper number of input arguments o calls its super class init method with TSU, 8000, and True o initializes location, and numberOfCampuses TSU has proper set and get methods for the data members. The set method for numberOfCampuses ensure that the user cannot set a negative numberOfCampuses. |
Vanderbilt Class | Vanderbilt inherits from University Vanderbilt has one additional instance variable numberOfColleges(int) Vanderbilt has an init method with proper number of input arguments that o calls its super class constructor with Vanderbilt, 10000, and true o initializes numberOfColleges Vanderbilt has proper set and get methods for the data members. The set method for numberOfColleges ensure that the user cannot set a negative numberOfColleges. |
Test | Create an object of TSU class and call it tsu. Initialize location to Nashville and numberOfCampuses to 2. Create an object of Vanderbilt called vandy. Initialize numberOfColleges to 8. Call proper get methods to print all instance variables of tsu and vandy. |
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
