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 (e.g., 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 70% penalty on your marks.
For the JUnit test cases, the class JunitTest_RideRequestTest.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 (e.g., 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 developer/computer programmer is a critical skill that is consistently applied. This lab requires you to develop a solution using Java object-oriented 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()
+ RideRequest(other: RideRequest)
+ RideRequest(input: String)
+ setRideDetails(rideDetails: String): void
+ setCustomerName(customerName: String): void
+ getRidePrice(): double
+ setRidePrice(ridePrice: double): void
+ isHasDiscount(): boolean
+ setHasDiscount(hasDiscount: boolean): void
+ ustatic getTaxrate(): double
+ static setTaxrate(taxrate: double): void
+ static getDiscount(): double
+ static setDiscount(discount: double): void
+ getCustomerName(): String
+ getRideDetails(): String
+ toString(): String
Note that class (i.e., static) methods and fields are indicated by underlining and constant (i.e.
final) fields are indicated via naming convention (i.e., ALL_CAPS).

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!