Question: Any use of Java library classes or methods ( e . g . , ArrayList, System.arraycopy ) is forbidden. That is , there must not
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
o Do not modify the test methods given to you.
o 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:
o No System.out.println statements should appear in it
o 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.
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.
UML Class Diagram for RideRequest Class
RideRequest
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
ustatic 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
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
