public class Product extends Object
| Modifier and Type | Field and Description |
|---|---|
private String |
description |
private double |
price |
| Constructor and Description |
|---|
Product(String description,
double price)
Creates a product instance.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getDescription()
Returns the description of the product.
|
double |
getPrice()
Returns the price of the product.
|
private String description
private double price
public Product(String description, double price)
description - the descriptionprice - the pricepublic String getDescription()
public double getPrice()
Copyright © 2022. All rights reserved.