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]
3 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]3 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
Students who utilize the "read, underline and eliminate" strategy are more likely to get better test grades. Why do you think th
Usimov [2.4K]
These students analyze each question, and eliminate each wrong answer they know are wrong. Even if they are unsure of the answer. They have a better chance of getting the answer right than the ones who dont. 
8 0
3 years ago
Read 2 more answers
How exactly do I answer questions?
pshichka [43]

Answer:

If you mean this website, click the add answer button on the question

Explanation:

8 0
2 years ago
Which description best explains a placeholder?
Oliga [24]

Answer:

A.   a box sketched on a wireframe to show where content or images will go.

Explanation:

A placeholder is way to represent the space used by a text or an image within the global layout when you don't have yet the content that goes there. It "holds the place" of a future element to be added later.

For images, you can just place a grey image showing there will be something there, in those dimensions, in the future.  Avoid placing an actual image not to be confused later and think the layout is complete, when you are missing an image.

For text, you can either use a blank space or filler text like "Lorem ispsum...", which would have the benefit of showing the font to be used.

In HTML, a placeholder is also used with input text fields to present an example of the data we're looking for.

4 0
4 years ago
Your recovery/recycling machine has r-502 refrigerant in it. you now have to recover refrigerant from a unit with r-22. what mus
zimovet [89]
Recover as much of the R-502 from the recovery unit as possible, change filter, and evacuate. In addition, to alter the compressor on a system containing R-410A, the person must isolate the compressor then evacuate the isolated section of the system to atmospheric pressure and hold. If system pressure does not increase, then remove the compressor. The recovered refrigerant may encompass acids, moisture and oils and every air conditioning or refrigerating system should be secure by a pressure relief device. 
5 0
3 years ago
I really need help with this question, I can’t fail this please :) tysm
Maurinko [17]

Answer:

i think its the third one, i hope this helps

Explanation:

4 0
4 years ago
Other questions:
  • Which structure is the following true for? For _________, the entire code is substituted for each call. Macros Both Macros and P
    14·1 answer
  • On the piano, the pitches/notes used on the bass clef are located on what part of the keyboard?
    9·2 answers
  • Which of the following is a device that plugs in a usb port on the computer or mobile device and contains multiple usb ports?
    9·1 answer
  • Melinda completed the Computer Programming Aptitude Test when she applied for a position with Beta Electronics. Six months later
    14·1 answer
  • _______is a network of physical objects embedded with sensors, processors, software and network connectivity capability to enabl
    6·1 answer
  • Which of the following statements is false? a. As of Java SE 8, any interface containing only one method is known as a functiona
    6·1 answer
  • What are the values of a[k] and a[k+1] after code corresponding to the following pseudocode runs?
    9·2 answers
  • 50 POINTS
    6·1 answer
  • Assume a large shared LLC that is tiled and distributed on the chip. Assume that the OS page size is 16KB. The entire LLC has a
    8·1 answer
  • Using robots to replace workers in factories is an example of which of the following forms of information processing systems? a.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!