Question: java please Create a class Sofa and then calculate the price of production. Sofa Variables: String name, double width, double height, and double depth (private)
java please
Create a class Sofa and then calculate the price of production.
Sofa
Variables: String name, double width, double height, and double depth (private)
Functions:
getName(), getWidth(), getHeight(), getDepth(),
setName(), setWidth(), setHeight(), setDepth(),
double Price(double cost) => cost * (width + height + depth)
1. Ask user to input the data
2. Print out the data
3. Get the price
Design Specification
- Provide a concrete implementation of methods in all derived classes.
- Use public, protected and private

==================== = = = = = = = = = = = = = Sofa Name: Sleeper Width: 19.2 Height: 8.4 Depth: 7.7 Cost: 11.1 Data = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Name: Sleeper Width: 19.2 Height: 8.4 Depth: 7.7 Cost: 391.83000000000004
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
