Question
write a class that satisfies the PersonDriver: The class will contain the following: An abstract Person class that contains one abstract method public abstract String
write a class that satisfies the PersonDriver: The class will contain the following: An abstract Person class that contains one abstract method "public abstract String doesForALiving()" An interface named Drinks that contains one abstract method "public abstract String drinks()" Create three additional classes all of which extends and implements Person and Drinks. > Student > Instructor >Hipster A Student returns "STUDENT: I spend all my time studying" for doesForALiving(); A Student returns ""STUDENT: I drink Red Bull" for drinks() An Instructor returns "INSTRUCTOR: I spend all my time teaching" for doesForALiving(); An Instructor returns "INSTRUCTOR: I drink coffee" for drinks() A Hipster returns "HIPSTER: I spend all my time grooming" for doesForALiving(); A Hipster returns "HIPSTER: I drink " for drinks() Output should be: STUDENT: I spend all my time studying STUDENT: I drink Red Bull INSTRUCTOR: I spend all my time teaching INSTRUCTOR: I drink coffee HIPSTER: I spend all my time grooming HIPSTER: And I drink High Noon
2-Look atWristWatch.javaDownload WristWatch.javaand examine the main method. Complete this class by doing the following to make the main method work: A WristWatch has a brand (String) and a cost (double) Create atwo-argumentconstructor Implement the Comparable interface and overload the compareTo method OverloadthetoString method Output should be: Timex: 44.5 Apple: 369.0 Omega: 700.0 Tag Heuer: 1520.5 Rolex: 10499.0
Step by Step Solution
3.42 Rating (149 Votes )
There are 3 Steps involved in it
Step: 1
Answer Here are the implementations for the classes Person Student Instructor Hipster and WristWatch ...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