Create two interfaces OLA and UBER both having a method public static Cab getCab()
which returns the Cab object where Cab is a nested class inside OLA and UBER.
Cab must have attributes cab_number and driver_name.
A user rides 5 times using cabs of OLA and UBER randomly which are stored in an array.
Now implement a method which should display the name of the driver and the company name
i.e. OLA/UBER when the valid cab_number is entered by the user.
Display "Invalid CAB details" when the cab_number entered by the user is incorrect.
This article is a great article that I have seen in my java programming career so far.
ReplyDeletewebsite development company in Surat Gujarat
Hello! I want to say that this article is amazing, nice written and come with almost all vital Information. I would like to see more posts like this. Some Questions to Check How Serious Your Prospect is for Buying
ReplyDelete
ReplyDeleteI am is grateful for the article. I am really looking forward to reading more. Also read this..
5 Mistakes Beginner Web Developers Commit and How to Fix Them