Reference no: EM132848232
QUESTION 1
MyCab is a private transport company which offers taxi service in Mauritius. In order to attract more clients, it would like launch a new mobile application to allow users to easily book a ride with the company. As an android mobile developer, you have been assigned on this project.
(a) Explain, showing your reasoning and by highlighting the importance of API level, which API level would you use to create this app.
The main feature of the app is to allow users to book a ride by providing the following information:
- First name and last name of the user
- Date and time of the ride
- The pick up location
- The drop off location
- The email and phone number of the user
The information would be stored on the device. A built-in algorithm will then use this information to determine the price of the fare. The app should also allow the user to cancel his ride.
(b) By making an analysis of existing mobile storage solutions, explain which one would you use to store this information.
(c) (i) Write the java code to create a class called Ride with setters and getters for the following properties:
Property Datatype
rideId int
firstName String
lastName String
date String
time String
pickUp String
dropOff String
email String
phone String
(ii) Write the class implementation that allows you to perform the create ride and delete ride operation mentioned above using an SQLite database. You may use the code snippet as per Figure1 in Annexure sent by mail.
(d) The company has asked to add a new feature: from the main activity, the user should be able to view all the rides he has booked and cancel them. Your co-worker Sam is working on this feature. However, when he runs the app, the list of booked rides does not appear.
The main activity has only two methods as shown in the code snippet as per Figure2 in Annexure sent by mail.
Using your knowledge about activity lifecycle, explain what is he doing wrong and how can he solve this problem. You may use diagrams and code snippets to support your answer.
Attachment:- Assessment Annexure.rar