/*** This is an implementation class for defining an item in the store.** @author (Yalena Cijntje)* @version (05/24/22)*/public class Product {//declaring instance variablesprivate String name;private String productNumber;private double price;private int quantity;//constructor for setting the values of all attributespublic Product(String name, String productNumber, double price, int quantity){this.name = name;this.productNumber = productNumber;this.price = price;this.quantity = quantity;}//getter for name attributepublic String getName() {return name;}//setter for name attributepublic void setName(String name) {this.name = name;}//getter for productNumber attributepublic String getProductNumber() {return productNumber;}//setter for productNumber attributepublic void setProductNumber(String productNumber) {this.productNumber = productNumber;}
End of preview. Want to read all 2 pages?
Upload your study docs or become a
Course Hero member to access this document
Term
Fall
Professor
Marvin Jones
Tags
Subroutine, public class Product, Yalena Cijntje, formatted String representation of the Product object