Create class for hardware store to represent invoice

Assignment Help Programming Languages
Reference no: EM1363423

Create a class called Invoice that a hardware store might use to represent an invoice for an item sold at the store. An Invoice should include four pieces of information as instance variables a part number (type String), a part description (type String), a quantity of the item being purchased (type int) and a price per item (double). Your class should have a constructor that initializes the four instance variables. Provide a set and a get method for each instance variable. In addition, provide a method named getInvoiceAmount that calculates the invoice amount (i.e., multiplies the quantity by the price per item), then returns the amount as a double value. If the quantity is not positive, it should be set to 0. If the price per item is not positive, it should be set to 0.0. Write a test application named InvoiceTest that demonstrates class Invoice's capabilities.

Reference no: EM1363423

Questions Cloud

Illustrate which law do you think texaco was found guilty : In 1976 independent Texaco retailers file suit against Texaco. In 1990, the Supreme Court of the United States found that Texaco had indeed violated antitrust law. Illustrate which law do you think Texaco was found guilty of violating.
Epistemological perspective or stance influence : In what ways does the choice of an epistemological perspective or stance influence the formulation of a management research problem?
Explain how is capital budgeting used in an organization : Explain How is capital budgeting used in an organization and What are the considerations that need to be analyzed when setting up a proposed budget
Accounting problem for yates corporation : Yates Corporation began operations on January 2, 2010. It employs 15 people who work 8-hour days. Each employee earns 10 paid vacation days annually. Please prepare journal entries to record the transactions related to paid vacation days during 201..
Create class for hardware store to represent invoice : Create a class called Invoice that a hardware store might use to represent an invoice for an item sold at the store. An Invoice should include four pieces of information as instance variables a part number.
Accounting for bad debts : What amount of bad debts expense will Hamilton Company report if it uses the direct write-off method of accounting for bad debts?
Variables found in biostatistics : Describe the source of variation which may occur in medicine and how they can affect clinical findings. Secondly, discuss the various types of variables found in biostatistics and how they affect data interpretation.
Explain organizations are challenged to allocate : Explain Organizations are challenged to allocate their resources and people in a manner in which the tasks and goals can be effectively accomplished.
Accounting roles-business organization : What is the difference between a role-based and principle-based system? Discuss Global Reporting initiatives, its purposes, the standard setting process and the use of its reporting system.

Reviews

Write a Review

Programming Languages Questions & Answers

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

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