Question: EECS 1 0 2 2 - Winter 2 0 2 4 - Lab 0 5 Due Date: Sunday, March 1 0 , 2 0 2
EECSWinter Lab
Due Date: Sunday, March before : PM Lab Exercise
Computational thinking for a software developercomputer programmer is a critical skill that is consistently applied. This lab requires you to develop a solution using Java objectoriented programming that simulates Ride Request.
The lab focuses on creating a RideRequest class, which models a request for a ride in a ridesharing or taxi service application. This class will encapsulate details about a ride, such as customer information, ride specifics, pricing, and discount eligibility. The assignment also involves implementing and testing various functionalities of the class.
Before you begin your implementation of the RideRequest class, it is crucial that you carefully read the Java API documentation provided in the doc folder. This documentation contains essential details and guidelines that will significantly assist you in understanding the requirements and specifications of the class you are to develop.
Why Read the Java API Documentation?
Understanding Specifications: The documentation provides clear specifications for each method and constructor in the RideRequest class, including input parameters, return types, and expected behavior.
Error Handling: Pay special attention to how errors and exceptions are to be handled, as outlined in the documentation. Proper error handling is a critical part of robust software development.
Enhanced Learning: Reading the API documentation enhances your learning experience, as it gives you insights into professional documentation standards and how they guide the implementation process.
Efficiency: Understanding the class requirements beforehand will make your coding process more efficient and reduce your time on revisions.
EECSWinter Lab
Due Date: Sunday, March before : PM UML Class Diagram for RideRequest Class
tableRideRequest customerName: String rideDetails: String ridePrice: double hasDiscount: boolean static taxrate: double static discount: double static toStringCounter: int RideRequest RideRequestother: RideRequest RideRequestinput: String setRideDetailsrideDetails: String: void setCustomerNamecustomerName: String: void getRidePrice: double setRidePriceridePrice: double: void isHasDiscount: boolean setHasDiscounthasDiscount: boolean: void static getTaxrate: double static setTaxratetaxrate: double: void static getDiscount: double static setDiscountdiscount: double: void getCustomerName: String getRideDetails: String toString: String
Note that class ie static methods and fields are indicated by underlining and constant ie final fields are indicated via naming convention ie ALLCAPS
EECSWinter Lab
Due Date: Sunday, March before : PM Lab Restrictions:
Any use of Java library classes or methods eg ArrayList, System.arraycopy is forbidden. That is there must not be any import statement at the beginning of this class. Violating this requirement will result in a penalty on your marks.
For the JUnit test cases, the class JunitTestRideRequestTest.java given to you
Do not modify the test methods given to you.
You are allowed to add new test cases by creating new test methods.
For each method which you are required to implement, derived from the JUnit test methods:
No System.out.println statements should appear in it
No Scanner operations eg input. nextInt should appear in it Instead, declare the method's input parameters as indicated by the JUnit tests.
Hint: You may use Java util.Arrays class, class Character or Class String.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
