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
  • java please Create a class Sofa and then calculate the price of

==================== = = = = = = = = = = = = = 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

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 Databases Questions!