Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Objective: The aim of this assignment is to give the student hands-on experience in developing a Java program that simulates a ride-sharing app. The student

Objective: The aim of this assignment is to give the student hands-on experience in developing a Java program that simulates a ride-sharing app. The student will learn how to use variables and functions to store and manipulate data and how to create if statements, loops and methods in Java.

Description: As a software developer working for a ride-sharing company, you have been tasked with developing a new app that allows riders to request rides and drivers to accept requests. The app should be able to match riders with the nearest available driver, compute the fare for the ride, and display the driver's information to the rider. Some of the things that need to be implemented into it are a Results Storage: The results of each ride should be stored in a text file. The app should implement a method for reading and writing rider and driver information to/from a file.

In assignment 1 and 2, your program should have the following features: setting the rider and driver information, requesting a ride, computing the fare, and displaying the driver's information and the fare for the ride. In this assignment, you are tasked with creating a sophisticated ride-sharing system that incorporates a range of advanced features. The system should be implemented using pre-defined classes, objects, GUI (javax.swing), methods, loops, if statements, reading and writing from/to files, input validation, and error handling through exception handling. This is assignment 3 by the way.

The app should be able to read the rider and driver information from a file upon starting up and use it to populate the ride-sharing system.

The app should save any changes to the rider and driver information to the file after each ride.

The app should use the file format that is most appropriate for the data, such as txt.

The app should handle file I/O exceptions and provide meaningful error messages to the user in case of any issues.

Exception Handling: The app should implement appropriate error handling and input validation through exception handling.

And the app should also have, Input and Validation: The app should read input from the keyboard and use loops to iteratively validate user input for the rider's location and destination. If statements should be used to check if the driver is available before a ride is requested. The app should also have a Main Method: Your main method should call the necessary methods to set the rider and driver information, request a ride, compute the fare, and display the driver's information and the fare for the ride.

I'm using eclipse to do this by the way. Please include the code to do this thanks.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Learning MySQL Get A Handle On Your Data

Authors: Seyed M M Tahaghoghi

1st Edition

0596529465, 9780596529468

More Books

Students also viewed these Databases questions

Question

5. Arranging for the training facility and room.

Answered: 1 week ago