I have a question to make a program for Car Hiring Company. I am stuck in few questions and not sure about some of my answers, so I would appreciate it if anyone can help me.
At the beginning it required me to implement the status of a hire car using an enum type, with this information (current status (viz. on hire, available for hire, or being serviced). so I wrote:
private enum carStatus {On_Hire, Available_For_Hire, Being_Serviced};
Is this correct?
If so, we come to the question that I didn't know how to solve:
Write three public boolean methods isAvailable, isOnHire and isBeingServiced to determine information about a hire car’s status.
Then it asks to write methods hireOut
, returnFromHire
and returnFromService
.
I don't know what it wants from this question? anyone can give me a tip ?
Can anyone help me how to solve this one please.