4. RetailItem Class
Write a class named RetailItem that holds data about an item in a
retail store. The class
should have the following fields:
• description. The description field references a String object
that holds a brief
description of the item.
• unitsOnHand. The unitsOnHand field is an int variable that holds
the number of units
currently in inventory.
• price. The price field is a double that holds the item’s retail
price.
Write a constructor that accepts arguments for each field,
appropriate mutator methods
that store values in these fields, and accessor methods that return
the values in these fields.
Once you have written the class, write a separate program that
creates three RetailItem
objects and stores the following data in them:
The Personal
Information
Class Problem
VideoNote
Description Units on Hand Price
Item #1 Jacket 12 59.95
Item #2 Designer Jeans 40 34.95
Item #3 Shirt 20 24.95
5. Payroll Class
Design a Payroll class that has fields for an employee’s name, ID
number, hourly
class RetailItem { private String description; private int unitsOnHand; private double price; public RetailItem(String description, int unitsOnHand, double price) { this.description = description; this.unitsOnHand = unitsOnHand; this.price = price; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public int getUnitsOnHand() { return unitsOnHand; } public void setUnitsOnHand(int unitsOnHand) { this.unitsOnHand = unitsOnHand; } public double getPrice() { return price; } public void setPrice(double price) { this.price = price; } } class RetailItemTest { public static void main(String[] args) { RetailItem item1 = new RetailItem("Jacket", 12, 59.95); RetailItem item2 = new RetailItem("Designer Jeans", 40, 34.95); RetailItem item3 = new RetailItem("Shirt", 20, 24.95); System.out.println("Description Units on Hand Price"); System.out.println("Item #1 " + item1.getDescription() + " " + item1.getUnitsOnHand() + " " + item1.getPrice()); System.out.println("Item #2 " + item2.getDescription() + " " + item2.getUnitsOnHand() + " " + item2.getPrice()); System.out.println("Item #3 " + item3.getDescription() + " " + item3.getUnitsOnHand() + " " + item3.getPrice()); } }

4. RetailItem Class Write a class named RetailItem that holds data about an item in a...
Write a class named RetailItem that holds data about an item in a retail store. The class should store the following data in attributes: item description, unit sold, units in inventory, and price. Once you have written the class, write a program that creates 5 RetailItem objects and stores the following data in them: Description Units Sold Units in Inventory Price Item #1 Jacket 20 12 59.95 Item #2 Designer Jeans 150 40 34.95 Item #3 Shirt 230 20 24.95...
Write a Gui programming by using JavaFx menus, stage and screen
concepts to the RetailItem class,
Write a class named Retailltem that holds data about an item in a retail store. The class should have the following fields description: The description field is a String object that holds a brief description of the item . unitsOnHand: The unitsOnHand field is an int variable that holds the number of units currently in inventory Price: The price field is a double that...
USE C++. Just want to confirm is this right~? Write a class named RetailItem that holds data about an item in a retail store. The class should have the following member variables: description: A string that holds a brief description of the item. unitsOnHand: An int that holds thw number of units currently in inventory. price: A double that holds that item's retail price. Write the following functions: -appropriate mutator functions -appropriate accessor functions - a default constructor that sets:...
Programming Assignment 6: Object Oriented Programming Due date: Check Syllabus and Canvas Objectives: After successfully completing this assignment, students will practice Object Oriented design and programming by creating a Java program that will implement Object Oriented basic concepts. RetailItem Class: Part 1: Write a class named RetailItem that holds data about an item in a retail store. The class should have the following fields: • description. The description field references a String object that holds a brief description of the...
Week 6: Lab Overview TABLE OF CONTENTS Lab Overview Scenario/Summary Write a windows console application that holds data about an item in a retail store. Your class should be named RetailItem and should hold data about an item in a retail store. The class will have the following member variables. Description - string holding the description of the item, unitsOnHand - int that holds the number of units in inventory Price - double that holds the price of the item...
in python Write a class named RetaiI_Item that holds data about an item in a retail store. The class should store the following data in attributes: • Item Number • Item Description • Units in Inventory • Price Create another class named Cash_Register that can be used with the Retail_Item class. The Cash_Register class should be able to internally keep a list of Retail_Item objects. The class should include the following methods: • A method named purchase_item that accepts a...
in java PART ONE ======================================= Below is the "RetailItem" class definition that we used in Chapter 6. Write a "CashRegister" class that leverages this "RetailItem" class which simulates the sale of a retail item. It should have a constructor that accepts a "RetailItem" object as an argument. The constructor should also accept an integer that represents the quantity of items being purchased. Your class should have these methods: getSubtotal: returns the subtotal of the sale, which is quantity times price....
Need this program in C#.
Thank you
3/19 Lab11 PartC Dur Scenario/Summary Write a windows console application that holds data about an item in a retail store. Your class should be named Retailltem and should hold data about an item in a retail store. The class will have the following member variables. Description- string holding the description of the item, unitsOnHand - int that holds the number of units in inventory Price - double that holds the price of the...
Room Class....... in JAVA!!!!! Write a class named Room that has the following fields: Length: Double variable that holds the rooms length(in feet). Breadth: The double variable that holds the rooms breadth(in feet). Height: Double variable that holds rooms height in feet. Color: String object that holds the color you want the room to be painted with. The class should have a constructor to initialize the fields for a particular instance (or object) of the class as given: All double...
Design a class named EmployeeRecord that holds an employee’s ID number, name, and payrate. Include mutator methods to set the values for each data field and output the values for each data field. Create the class diagram and write the code that defines the class and implements the mutator methods. need help please with this question