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
How do you render and export files on blender
Debora [2.8K]

Answer:

Save your Blender file (. blend) in the same folder as your . obj file, if you didn't already.

Click on File/External Data/Pack All into . blend.

Click on File/External Data/Unpack All Into Files.

Choose "Use files in current directory (create when necessary)"

Explanation:

<em>Hope </em><em>it </em><em>helps </em><em>ya </em><em>ItzAlex</em>

6 0
3 years ago
Special numeric has three digits and holds a property that it is exactly equal to summation of cubes from each digit. For exampl
Vera_Pavlovna [14]

Answer:

The following code is written in C programming language:

#include <stdio.h>     //header file

 

int main()       //main method

{

   int n, t, digit1, digit2, digit3;      // set integer variables

    // print message

   printf("Print all Special integer numbers between 100 and 999:\n");

   n = 100;      //initialize value in variable "n"    

   while (n <= 999)      //set while loop

   {

       digit1 = n - ((n / 10) * 10);

       digit2 = (n / 10) - ((n / 100) * 10);

       digit3 = (n / 100) - ((n / 1000) * 10);

       t = (digit1 * digit1 * digit1) + (digit2 * digit2 * digit2) + (digit3 * digit3 * digit3);

       if (t == n)      //set if statement

       {

           printf("\n Special integer number is: %d", t);     //print an output

       }

       n++;

   }

}

Output:

Print all Special integer numbers between 100 and 999:

Special integer number is: 153

Special integer number is: 370

Special integer number is: 371

Special integer number is: 407

Explanation:

Here, we set the header file "stdio.h".

Then, we define integer type "main()" function.

Then, we set five integer type variable "n", "t", "digit1", "digit2", "digit3".

Then, we the print message by print() method and initialize a value to variable "n" to 100.

Then, we set the while loop which starts from 100 and stops at 999 and if the condition is true than code inside the loop is execute either loop is terminated.

Then, we set the if statement and pass the condition, if the condition is true the output would be print either if the condition is false the if statement is terminated.

8 0
3 years ago
People often want to save money for a future purchase. You are writing a program to determine how much to save each week given t
GenaCL600 [577]
.................................
7 0
3 years ago
Read 2 more answers
PLS HELP MEE!!!
kramer

Answer:

starting with lowercase letters, using uppercase letters for the first letter in a new word

Explanation:

starting with a dollar sign, using lowercase for the remaining parts of each word

4 0
2 years ago
HELP ASAP PLZZZZZ
musickatia [10]

Answer:

third one

Explanation:

3 0
2 years ago
Other questions:
  • A technology _____ begins with the birth of a new technology and ends when that technology reaches its limits and dies as it is
    13·1 answer
  • ________ computers are specially designed computer chips that reside inside other devices, such as a car. Select one: A. Tablet
    11·2 answers
  • You are going to write a program for Computer test which will read 10 questions from a file, order them randomly and provide the
    11·1 answer
  • Count input length without spaces, periods, or commas Given a line of text as input, output the number of characters excluding s
    8·2 answers
  • Which of the following is true regarding the mod operator, %? Group of answer choices It can only be performed on int values and
    8·2 answers
  • Why is the most important factor for investors always the quality of the venture's leadership team
    12·1 answer
  • Evonka is listening to music from an online music provider (such as Pandora or Jango). She builds a list of music preferences, i
    15·1 answer
  • Can someone help me?
    10·1 answer
  • The most serious security threat to Bluetooth-enabled devices is ____, which occurs when a hacker gains access to the device and
    10·1 answer
  • Should a UDP packet header contain both Sour Port # and Destination Port #?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!