Question: Can some please help me to answer these two questions. Write a program in Java create a class diagram fragment with two classes: User and
Can some please help me to answer these two questions. Write a program in Java
- create a class diagram fragment with two classes: User and Patient. Patient is a sub-class of User. User has a method getName(), which is both over-loaded and over-ridden in the subclass
- In Java write an abstract class called User. User has one abstract method called authenticate, which takes two string parameters. Write a concrete sub-class of User called Administrator with an implementation of the authenticate method. The authenticate method should just test that the two parameters are not null. Finally, write an interface called Printable, which includes one method called print. The Administrator class implements the Printable interface and prints the object (this.toString() ) to the command line.
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
