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
In every organization, workers receive and sendinformation daily. The flow of this information should be____________.upward and
Aleks [24]

Answer:

upward and downward

Explanation:

4 0
3 years ago
Help easy 50 points!!!!<br> How do i make someone be the brianliest? No crown thing is appering!!!!
IrinaVladis [17]

Answer:

When someone answers your question there should be a button to crown them but it's weird there is no crown showing...

4 0
3 years ago
Read 2 more answers
The goal of a system is to
andreyandreev [35.5K]

Answer:

The answer is option C, which is: perform a task

6 0
3 years ago
Which ofthe following is the most correct statement about the interestsection of the indirect plan for persuasion?
Musya8 [376]

Answer: d)- Show benefits to receiver

Explanation: Indirect plan is the approaching a person in a indirect manner and just giving the hint about the main idea rather than presenting the main idea. For creating interest section the idea of attracting the receiver by showing the benefits of the plan is the major option. Because just by sharing the benefit and hint of plan,receiver tends to be attracted towards the plan .

5 0
3 years ago
Suppose x and y are int variables and ch is a char variable. Consider the following input: 5 28 36 What value (if any) is assign
eimsori [14]

Answer:

x is assigned "5", y is assigned "28", and ch is assigned "$"

Explanation:

#include <stdio.h>

#include <iostream>

using namespace std;

int main()

{

   int x,y;

   char ch;

   x = 5;

   y = 28;

   ch = 36;

   cout<<x<<endl<<y<<endl;

   cout<<ch;

   return 0;

}

4 0
3 years ago
Other questions:
  • What daily life problems does the algorithm quicksort solve?
    14·1 answer
  • How does this splitting wedge make work easier?
    15·1 answer
  • Pressing the e key while in edit mode will exit the interaction mode<br><br> true<br><br> false
    7·1 answer
  • The use of themes in WordPress is a good illustration of what major concept?
    6·1 answer
  • How can a signature be added to an email message? Check all that apply.
    10·2 answers
  • Network topology is a direct representation of
    9·1 answer
  • when working with smart which tab would provide the ability to change the shape or size of the smart art shapes
    15·2 answers
  • A rectangle indicates a single process.true or false​
    7·2 answers
  • Can someone take away your points
    15·1 answer
  • How do you stop getting emails from brainly saying "sarah from brainly has answered your question"
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!