Create a main program as MyStore2 Prompt the user to enter the following details via keyboard       Enter Item Name              : ________       Enter price tag                   : ________       Enter number of items     : ________   Instantiate an object of Items class and pass the variables as the parameters for the new Product.   ------------------------------------------------------------ Create a Items class Declare the following as private properties: itemName, itemPrice, and numItems Create a constructor of the Items class      * copy the values of the parameters in the constructor to the properties.      * Display the following:         Product name    :         Price tag             :           Cost                     : ?         Discount             : ?         Net Amount       : ?       -------------------------------------------------------------- Enter Item Name          : Coca Cola Litro Enter price tag               : 35.00 Enter number of items : 10   Product entered: Coca Cola Litro Price tag             : 35.0000 Total Amount    : 350.00000 Discount             : 0.0000 Net Amount       : 350.00000   --------------------------------------------------------------

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Create a main program as MyStore2

Prompt the user to enter the following details via keyboard

      Enter Item Name              : ________

      Enter price tag                   : ________

      Enter number of items     : ________

 

Instantiate an object of Items class and pass the variables as the parameters for the new Product.

 

------------------------------------------------------------

Create a Items class

Declare the following as private properties:

itemName, itemPrice, and numItems

Create a constructor of the Items class

     * copy the values of the parameters in the constructor to the properties.

     * Display the following:

        Product name    : <itemName>

        Price tag             : <itemPrice

        Cost                     : ?

        Discount             : ?

        Net Amount       : ?

     

--------------------------------------------------------------

Enter Item Name          : Coca Cola Litro

Enter price tag               : 35.00

Enter number of items : 10

 

Product entered: Coca Cola Litro

Price tag             : 35.0000

Total Amount    : 350.00000

Discount             : 0.0000

Net Amount       : 350.00000

 

--------------------------------------------------------------

  

 Cost is equal to numItems x itemPrice

    Discount is given as 10% of Amount OR 60 pesos whichever is lower; whenever the Amount exceeds 

                     500.000

    Net Amount is the difference between Cost and Discount.

Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education