1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
noname [10]
2 years ago
15

Write a class named RetailItem that holds data about an item in a retail store. The class should store the following data in att

ributes: item description, units in inventory, and price. Once you have written the class, write a program that creates three RetailItem objects, and stores the following data in them:
Description Units in Inventory Price
Item #1 Jacket 12 59.95
Item #2 Designer Jeans 40 34.95
Item #3 Shirt 20 24.95
Computers and Technology
1 answer:
sp2606 [1]2 years ago
7 0

Answer:

public class Main

{

public static void main(String[] args) {

 

 RetailItem ob1 = new RetailItem("Jacket", 12, 59.95);

 RetailItem ob2 = new RetailItem("Designer Jeans", 40, 34.95);

 RetailItem ob3 = new RetailItem("Shirt", 20, 24.95);

 

}

}

class RetailItem {

   

   private String itemDescription;

   private int units;

   private double price;

   

   public RetailItem(String itemDescription, int units, double price) {

       this.itemDescription = itemDescription;

       this.units = units;

       this.price = price;

   }

}

Explanation:

Create a class called RetailItem that has three variables itemDescription, units, and price

Initialize a constructor that takes three parameters to set the values

Inside the main, create three objects with given data

You might be interested in
This refers to the people involved in the data processing operation.
yawa3891 [41]
The people involved in the data processing operation are known as <span>Peopleware.</span>
6 0
3 years ago
n macOS, what launch point provides access to almost all the settings needed to administer a macOS system?
Fynjy0 [20]

Answer:

System preferences.

Explanation:

MacOS is the primary operating system designed and developed for Apple computers (MacBook).

In macOS, system preferences is a launch point that provides access to almost all the settings needed to administer a macOS system. The system preferences allow users to change various settings on their Mac computers such as changing the desktop layout, desktop picture (wallpaper), size and location of the dock, font size, appearance, energy saver etc.

5 0
2 years ago
In which generation microprocessor was developed short answer of computer science​
3241004551 [841]

Explanation:

in fourth generation microprocessor was developed.

may it helped u

5 0
3 years ago
The piece of hardware that contains the circuitry that processes the information coming in to the computer and tells the other h
Gemiola [76]

The answer is C. Central processing unit (or CPU).

The trick is in the name, central processing unit :)

3 0
3 years ago
What are examples of templates the Input Mask Wizard offers? Check all that apply.
Vesna [10]
The answer is A B AND D mark me brainliest?
5 0
2 years ago
Read 2 more answers
Other questions:
  • A ____ is a battery-operated power source directly attached to one or more devices and to a power supply (such as a wall outlet)
    14·1 answer
  • A(n) ______ system is a set of programs that coordinates all the activities among computer or mobile device hardware. a. managem
    10·1 answer
  • Number 20, can anyone help?
    11·1 answer
  • 1. What are copyright laws? (6 points)
    15·1 answer
  • The best way to achieve stronger encryption is to
    13·1 answer
  • What are the differences between tkinter toolkit and PyQt?
    14·1 answer
  • What color mode would you use when designing for web &amp; devices?
    9·1 answer
  • A or an is a simple chip with two or more processor core
    5·1 answer
  • Where is the element coded in a web page.
    13·1 answer
  • Spreadsheets are sometimes credited with legitimizing the personal computer as a business tool. Why do you think they had such a
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!