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
ith reference to McCall's quality modle , what are the three important aspects of a software product ?
geniusboy [140]

Answer: According to McCall's quality model , the three important factors for the aspect of a software product are:-

  • Product Revision
  • Product Operation
  • Product Transition

Explanation:

Product Revision:-these are the factors which includes the maintenance, flexibility and testing of a software .

Product Operation:-these include the factors like checking the correctness, usability, reliability, efficiency and Integrity of software to maintain its quality

Product Transition:- these are the qualities that define the portability, interoperability and whether the software can be reused or not .

7 0
3 years ago
Two stations running TCP/IP are engaged in transferring a file. This file is 1000MB long, the payload size is 100 bytes, and the
weeeeeb [17]

Answer:

a. 2100

b. 2199

Explanation:

GIven that:

The file size = 1000 MB

The  payload size is  = 100 bytes

The negotiated window size is = 1000 bytes.

This implies that the sliding window can accommodate maximum number of 10 packets

The sender receives an ACK 1200 from the receiver.

Total byte of the file is :

1000 MB = 1024000000 bytes

a.

Sender receives an ACK 1200 from the receiver but still two packets are still unacknowledged

=1200 + 9 * 100

= 1200 +  900

= 2100

b. What is the last byte number that can be sent without an ACK being sent by the receiver?

b. Usually byte number starts from zero, in the first packet, the last byte will be 99 because it is in 1000th place.

Thus; the last byte number send is :

= 1200 + 10 *100 -1

= 1200 + 1000-1

= 1200 + 999

= 2199

6 0
4 years ago
A program is run line by line to determine the source of a logic error. Which best describes the specific tool being used?
riadik2000 [5.3K]

Answer:

c

Explanation:

3 0
3 years ago
Read 2 more answers
What type of database contains multiple collections of data that are related to one another cells
statuscvo [17]
The different types<span> of </span>databases<span> include operational </span>databases<span>, end-user </span>databases<span>, distributed </span>databases<span>, analytical </span>databases<span>, relational </span>databases<span>, hierarchical </span>databases<span> and </span>database<span> models. 

Source Bing</span>
7 0
3 years ago
What is the function of the GUI?
topjm [15]
C. Provides an interface between user and OS.
The GUI, or Graphical User Interface, is just about everything you generally see with a common computer or smartphone.  You rarely run an application or program from the command itself, as clicking an icon in the GUI runs the software for you.
6 0
4 years ago
Read 2 more answers
Other questions:
  • The different types of DDR modules are easily identifiable because of what factor?
    8·2 answers
  • To enable a compute or device that does not have built-in networking capability, use a(n) ______.
    13·1 answer
  • How can the output of a command be redirected to a file instead of being displayed on the computer's screen?
    9·1 answer
  • Explain how a monitor can display the letters that you type on a keyboard. (Hint: Three Basic Computer Functions) *
    11·1 answer
  • The Internet Engineering Task Force (IETF) defines the protocols and standards for how the Internet works. The members of the IE
    12·1 answer
  • Sarah has entered data about football players from team A and team B in a worksheet. She enters names of players from team A wit
    9·2 answers
  • What is the difference between arithmetic and logical operations​
    8·1 answer
  • Several programmers write individual code modules that are used for different processes in a vehicle. Individual tests have alre
    13·1 answer
  • Select the correct answer.
    10·1 answer
  • Look over the image in the top section and choose which piece from the bottom should be placed in the question mark (?) that wou
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!