Computers and Technology

In java : define the following: 1. a superclass called item with itemcode and name as private variables. the item class should define:

a) a constructor method to assign values to both itemcode and name. b) a display method to display itemcode and name2. define an interface called discount, which should have the following method declaration.3. define another interface called tax, which should have the following method declaration. public double computetax(); 4. a sub class called grocery with the following private variables: double price; double units; double discount; the grocery class should define the following methods: 1) a constructor to assign values to price, units, discount and it has to call super class constructor to pass values to super class constructor.2) which is declared in the interface discount3) which is declared in tax interface4) double computetotalprice() to compute the final price for the item5) a method displaygrocery() to display itemcode, name, unit price, units, savings, subtotal, tax amount, and final price for the item. note: here the discount and tax are to be taken in percentage. the discount is optional, meaning you can buy an item without any discount at sometimes and with discount at other times. so, you pass 0 when there is no discount and you pass different percentages say 10 %, 20%, etc. at other times5. another sub class with the name clothing with the following private variables: private string brand; private double price; private double units; private double discount; final double taxp=8.5; the clothing class should define the following methods.1) a constructor to assign values to brand, unit price, units, discount and it has to call super class constructor to pass values to super class constructor.2) which is declared in the interface discount3) which is declared in tax interface4) double computetotalprice() to compute the final price for the item5) displayclothing()method to print: itemcode, name, brand, unit price, units, subtotal, savings, tax amount, and final price for the item. note: here the discount and tax are to be taken in percentage. the discount is optional, meaning you can buy an item without any discount at sometimes and with discount at other times. so, you pass 0 when there is no discount and you pass different percentages say 10 %, 20%, etc. at other times. all clothing items are 8.5% taxable6. a demodepartmentbilling class with the main method. in the main method, you should do the followinga. create two objects for grocery class: itemcode-11, name -bread, units -2, price-$1.50, discount-0, tax-0 itemcode-12, name- apple, units – 6, price-$0.75, discount-1%, tax-0b. create two objects for clothing class: itemcode-21, name- jeans, units-1, price-$35, brand-levis, discount0% itemcode-22, name- dress shirt, units-2, price-$25, brand-izod, discount-10 %c. find the total bill amount for all four items together and call displaygrocery() and displayclothing to print the details of the four objects and finally print the total bill amount.

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 17:30, staz13wiggins
How many pairs of chromosomes do human body cells contain?
Answers: 2
image
Computers and Technology, 22.06.2019 01:50, divine134
A.) generate scaffolding to create database for your application. develop all the entities identified in assignment #2. add any additional that may be identified later. b.) add data validation rules to the models that are appropriate for your application and data. c.) create links for each scaffold in the header section. part 2: application updates [30 points] a.) add two additional views to the "home" controller you created in assignment #1. b.) the two views should be named as “privacy" and "". c.) link the two newly created views in the footer section. hint: you would need to modify the “home" controller definition and create “privacy. html. erb" and “.html. erb" files in appropriate locations.
Answers: 3
image
Computers and Technology, 22.06.2019 14:30, megkate
Complete the sentence based on your knowledge of the professional difficulties faced by music artists. digital technology allows audiences to see free live telecasts of music or dance performances through
Answers: 1
image
Computers and Technology, 22.06.2019 22:40, nsuleban9524
When you type the pwd command, you notice that your current location on the linux filesystem is the /usr/local directory. answer the following questions, assuming that your current directory is /usr/local for each question. a. which command could you use to change to the /usr directory using an absolute pathname? b. which command could you use to change to the /usr directory using a relative pathname? c. which command could you use to change to the /usr/local/share/info directory using an absolute pathname? d. which command could you use to change to the /usr/local/share/info directory using a relative pathname? e. which command could you use to change to the /etc directory using an absolute pathname? f. which command could you use to change to the /etc directory using a relative pathname?
Answers: 3
Do you know the correct answer?
In java : define the following: 1. a superclass called item with itemcode and name as private varia...

Questions in other subjects:

Konu
Mathematics, 12.11.2020 17:40