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
When the "swen" virus infected someone's system, it made significant changes to the registry that caused it to be extremely diff
Effectus [21]
<span>In certain cases, when the Swen executable is removed or renamed by an anti virus program without stopping to fix the registry, it then will become impossible to run any executable files on the machine. This happens because windows will be unable to find the file that is associated with any executables on it's hard drive.</span>
7 0
3 years ago
Which is a connectionless protocol in the transport layer? What are the small chunks of data called?
xeze [42]

Answer:

User Datagram Protocol (UDP) , transport-layer segment.

Explanation:

The User Datagram Protocol is popularly known as UDP. It is defined as the communication protocol which is used across the internet for any time sensitive transmission like the DNS lookup or the video playback.

The UDP provides a unreliable and connectionless service to a invoking application.

The transport layers on sending side converts the application $\text{layer }$ messages which it $\text{receives}$ from the $\text{sending application process}$ into a transport layer segment called as the transport layer segments. This is achieved by breaking down the application messages into a smaller chunks and then adding the transport layer header into each chunk so as to create a transport layer segment.

6 0
3 years ago
Read 2 more answers
What does a file association specify?
Olenka [21]

Answer:

The answer is D

Explanation:

file association associates a file with an application capable of opening that file. More commonly, a file association associates a class of files with a corresponding application.

4 0
2 years ago
Read 2 more answers
17.
Radda [10]
Sorry to answer you so late but that would be truth because that is the first rule of science which is what thermodynamics depends in. 

The first law of thermodynamics is a type of law of conservation but with thermodynamics systems. 


So, in gogle I found this: "The law of conservation of energy states that the total energy of an isolated system is constant; energy can be transformed from one form to another, but cannot be created or destroyed."

Like I said, sorry to reply so late but I hope this helped! =)
3 0
3 years ago
Drag each tile to the correct box.
garri49 [273]
I think select the video insert select the movie option under illustrations resize the video player then select the insert tab i’m not 100 percent sure tho
8 0
3 years ago
Read 2 more answers
Other questions:
  • Cloud Kicks is undergoing a GDPR-focused implementation to ensure access to personal information data is limited to only users w
    7·1 answer
  • Mirrors on cars exist to____.
    7·2 answers
  • An application is to be written that would allow students to find out their GPA(double) and their total number of credits (an in
    15·1 answer
  • HIPAA requires the following controls for medical records: A. Encryption of all data B. Technical safeguards C. Physical control
    12·1 answer
  • IRQ 0 interrupt have _______________ priority<br> ? low<br> ? medium<br> ? highest<br> ? lowest
    13·1 answer
  • All of the Internet in your country disappears. What happens next?
    13·1 answer
  • What is the cell reference for row 22 and column B? __________<br><br> In excel
    5·1 answer
  • Can somebody PLEASE help me cancel my subscription I have tried so many different things and contacted support - they are no hel
    14·1 answer
  • What science category includes physics and biology?
    14·1 answer
  • Is permanent software programmed into read-only memory.<br> Firmware<br> JavaScript<br> PHP<br> o
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!