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
Write keyboard shortcut to insert footnote and endnote​
loris [4]

Answer:

Alt + Ctrl + F to insert a footnote.

Alt + Ctrl + D to insert an endnote.

Correct me, if I am wrong :)

Have a great day!

Thanks!

5 0
2 years ago
HTML5 is______because it works on tablet or smartphone,notebooks
jeyben [28]

Answer:

Wonderful and easy language

Explanation:

Hope this helps

3 0
3 years ago
Read 2 more answers
Your boss calls you from his home to use the VPN connection you configured for him
prisoha [69]

Its not c or b. I think it's a. Im not sure tho..

7 0
3 years ago
What are the ways of closing an Microsoft word application? ​
Juliette [100K]

Answer:

By pressing key ALT and F4 to close a window application.

Explanation:

<em>Closing Microsoft application comes in different ways such as: </em>

<em> a. Pressing ALT and F4 to close an active window application. </em>

<em>b. Press the X button at the upper right of the screen. </em>

<em> If you are using a MAC or apple computer with Windows emulator, you can simply press on COMMAND key and W key to close an active window application.</em>

4 0
2 years ago
Which of these characteristics is most important to a systems analyst? (1 point) (Points : 1.5) communicator
zvonat [6]

Answer: Problem solver

Explanation:

 Problem solver is the most important characteristics for the system analyst as it important for the organization to control all the problems.

System analysis basically define the problem in the particular organization to be solved and also provide the proper architecture in the system.  

The good and strong problem solving ability makes the organization more efficient in the decision making problem and also improve the overall system analyst in the organization.

7 0
3 years ago
Other questions:
  • Which statement does not describe the guidelines for the use of text in presentation programs?
    7·1 answer
  • Which of the following Internet protocols is used to request and send pages and files on the World Wide Web?
    15·1 answer
  • Which type of error is a random error
    13·2 answers
  • When one makes a social media post, what happens on other devices with the same app?
    13·1 answer
  • According to the presentation, integrity and ethics are particularly important for careers in which of the following pathways?
    5·1 answer
  • When should you integrate technology?​
    14·2 answers
  • Can someone tell me how to get rid of the the orange with blue and orange on the status bar
    14·2 answers
  • Explaio mode of Operation of x-ray​
    15·2 answers
  • Can able to Computer decide its input by itself? How ?​
    15·1 answer
  • There is overlap in the subjects of study in the different information technology disciplines. true or false
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!