Answered step by step
Verified Expert Solution
Question
00
1 Approved Answer
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
Step: 1
Get Instant Access with AI-Powered 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