CSCI 4176 & 5708 Lab Assignment 01 

$30.00

Download Details:

  • Name: Lab-Assignment-1-jxhv3c.zip
  • Type: zip
  • Size: 222.82 KB

Category:

Description

Rate this product

In A1, you will implement two classes, one interface, and a fourth file with the main method for your Kotlin program. Here is the UML Class Diagram for A1: Remarks: – The name and registry properties on Doctor should be “final”. – The setPhone number in function in Doctor should return true and replace the doctor’s phone number if the string has exactly 10 characters (yes, it is an oversimplified check) and return true. It should return false otherwise – The Doctor toString should return: “Name (Registry) – PhoneNumber” – The Hospital Doctor should return: “Name (Registry) – PhoneNumber” Badge: BadgeNumber – The HospitalDoctor’s implementation of the ICanOperate interface method should return: “Scalpel please” The main method In another file you will implement the main method that will “test” your code. No user input is required, you can be creative with names In the method you will 1. Create 2 Doctors and 3 Hospital Doctors 2. Create an empty list of Doctor 3. Add the doctors to a list of Doctor 4. Iterate over the list and print the Doctor object 5. Check to see if the doctor is implementing the ICanOperateInterface. If it is print the return of the operateOnPatient method