Create a subclass named shipped order that overrides

Assignment Help Computer Engineering
Reference no: EM131853267

Problem

Complete the following tasks:

a. Create a class named Order that performs order processing of a single item. The class has four fields: customer name, customer number, quantity ordered, and unit price. Include set and get methods for each field. The set methods prompt the user for values for each field. This class also needs a compute Price() method to compute the total price (quantity multiplied by unit price) and a method to display the field values.

b. Create a subclass named Shipped Order that overrides compute Price() by adding a shipping and handling charge of $4.00.

c. Create the logic for an application that instantiates an object of each of these two classes. Prompt the user for data for the Order object and display the results; then prompt the user for data for the Shipped Order object and display the results.

d. Create the logic for an application that continuously prompts a user for order information until the user enters "ZZZ" for the customer name or 10 orders have been taken, whichever comes first. Ask the user whether each order will be shipped, and create an Order or a Shipped Order appropriately. Store each order in an array. When the user is done entering data, display all the order information taken as well as the total price that was computed for each order.

Reference no: EM131853267

Questions Cloud

Write a technical report : List at least 2 viable options / topics that you can write a technical report (internal report, status report, and so on) with.
Write a method that calls the method designed in : Write a method that calls the method designed in. If the method throws an exception, force the price of the job to 0.
Summarize the article by highlighting the key components : Choose an article in the Wall Street Journal related to a topic covered in class. Your will need to complete the following for this assignment.
What does the ceo means by a global strategy : List THREE (3) of the major priorities or key competitive factors associated with a world class organization.
Create a subclass named shipped order that overrides : Create a subclass named Shipped Order that overrides compute Price() by adding a shipping and handling charge of $4.00.
What need or function does the product serve : Choose an international company and one of the company's products and give the background of the company and why you chose the product.
Is this approach to solving problems effective : Is this approach to solving problems more or less effective in solving real workplace problems? Why or why not?
Create a class named tape that includes fields for length : Create a class named Tape that includes fields for length and width in inches, and create get and set methods for each field.
What is the bond annual yield to maturity : What is the bon's annual yield to maturity? YOU MUST SHOW ALL WORK AND USE AT LEAST 4 DECIMAL PLACES.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Explain the software packages in detail

explain the software packages in detail. analysis of the advantages and disadvantages of each of the software packages used.

  Implement the davidon-fletcher-powell method

Write a computer program to implement the Davidon-Fletcher-Powell method using the cubic interpolation method of one-dimensional search. Use a finite-difference scheme to evaluate the gradient of the objective function.

  Questionour program has to take a string representing a

questionour program has to take a string representing a sentence in english and format it properly. the input sentence

  Write a program that simulates inventory bins in a warehouse

Write a program that simulates inventory bins in a warehouse. Each bin holds a number of the same type of parts.

  Write a program that calculates a tip

Write a program that calculates a tip according to the diner's satisfaction as Ask for the diners' satisfaction level using these ratings.

  Question 1a what is the main advantage of using master

question 1a what is the main advantage of using master pages?b explain the purpose and advantage of using styles?c name

  Create an activity diagram for the system and class diagram

List all use cases of your IT solution in your Final project document. Create an Activity Diagram for the system, class diagram, and a System Sequence Diagram.

  Performance clause in the license agreement

Explain why is it significant to have the performance clause within the license agreement?

  What are the kinds of files used in oracle recovery

What are the ways in which an Oracle database can be created.

  The difference between a worm and a trojan horse

What do you tell him is the difference between a worm and a Trojan horse. List at least six reasons you can give John for preventing viruses and other malware.

  Questiona queue has definite characteristics as listed

questiona queue has definite characteristics as listed below-head-the next item to exit queue is always the

  Design the instruction formats using class code method

There are three classes of instructions in an instruction set (two-address, one address, and zero-address). All instructions must be 32 bits long.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd