Provide a set and a get method for each instance variable

Assignment Help Visual Basic Programming
Reference no: EM131143486

Visual Basic Invoice Class Application

Class 1

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-(private)

- a part number (type String),
- a part description (type String),
- a quantity of the item being purchased (type int ) -in case of negative value set this to zero
- price per item (double) -in case of negative value set this to zero

Constructor

Your class should have a constructor(with 3 parameter) that initializes the four instance variables.

Methods

1. Provide a set and a get method for each instance variable.

2. 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

3. InvoiceTest that demonstrates class Invoice's capabilities. provide a method getInvoiceDetail that returns all the information(in the form of string) contained in the invoice object.

Reference no: EM131143486

Questions Cloud

Calculate the volume of excavation in cubic yards : For the data tabulated, calculate the volume of excavation in cubic yards between stations 10 + 00 and 15 + 00.
What kinds of goals or problems do they deal with : Dissect the meaning of this quote and state the meaning of managerial ideology in your own words (as if you were explaining it to someone else) - Do some organizations have a more difficult time with this than others?
Summary on three leadership theories divided into groups : I need help with a 600 word summary on three Leadership theories divided into groups that will explore the idea that a set of competencies predicts the effectiveness of leadrs.
Prepare the entry to record the exchange of assets : Lupa Inc. trades its used machine (cost $12,000 less $4,000 accumulated depreciation) for a new machine. In addition to exchanging the old machine (which had a fair market value of $9,000), Lupa also paid cash of $3,000.
Provide a set and a get method for each instance variable : Provide a set and a get method for each instance variable. provide a method getInvoiceDetail that returns all the information(in the form of string) contained in the invoice object.
Determine the end area graphically by counting squares : From the following excerpt of field notes, plot the cross section on graph paper and superimpose on it a design template for a 40-ft-wide level roadbed with cut slopes of 3:1 and a subgrade elevation of 1239.50 ft. Determine the end area graphical..
What are the major sources of uncertainty in environment : What are the major sources of uncertainty in the environment? Discuss how these sources of uncertainty affect a small biotechnology company and a large carmaker. This is a comparative study on the subject topic for Chapter Three. Please provide your ..
Compute flying height above average ground in feet : On a vertical photograph of flat terrain, section corners appear a distance d apart. If the camera focal length is f compute flying height above average ground in feet for the following data
What prompted this restructuring : In last week's readings, two restructuring interventions were described: downsizing and reengineering. An example of such efforts include the recent cuts and realignment at Microsoft®. What prompted this restructuring?

Reviews

Write a Review

Visual Basic Programming Questions & Answers

  Add a label control to the form

add a Label control that shows the path to the file being processed.add a Label control that shows the path to the file being processed.

  Keep a record of the total attendance

Keep a record of the total attendance and the total cash collected from ticket sales from all events happening at the Games.

  Write a program that asks for the amount of the bill

Write a program that asks for the amount of the bill and percentage tip and calculates the tip. The program should use variables for each of the quantities and display the outcome in a text box with a label. Test the program on a bill of $20 and a..

  Shipping charge for the following zip codes

Need application code for visual basic should display the appropriate shipping charge. shipping charge for the following ZIP codes is $32: 60618, 60620, and 60632. All other ZIP codes are charged $37.75. Code the application in visual basic

  Ticketseller

Use Visual basic 2010Visual Basic,  TicketSeller. This assignment will contain two (2) Parts: Event Planning Document and Coding phase. You must submit both parts as separate files for the completion of this assignment. Remember, you are only to de..

  Under what conditions script is used

Create a script that uses the following components: an array, sub procedure, explicit declaration, RUNAT=Server, and a function.

  Create an application that stimulates the functionality

Create an application that stimulates the functionality of the gas pump. User enters the number of gallons to purchase and clicks the desired grade (each grade is represented by a Button whose Text properties are set to Regular, Special, and Super..

  What are the rules for charging the various rates

pen the figurethisout solution. Open the code editor window and study the btnDisplay_click procedure. What task does the procedure preform? What are the rules for charging the various rates?

  To demonstrate completing and delivering a prototype rad

to demonstrate completing and delivering a prototype rad system using oops capabilities of vb.net. prepare a vvb boards

  Write visual basic program to accept values of any unit

Write down VISUAL BASIC program to accept numeral values of any unit, sum up the total, compute the average, and then Output result with proper unit.

  Create the code form a program in visual basic.net 2003

Create the code form a program in Visual Basic.net 2003

  Showing data from black friday sales including cost

I need a vb application in Microsoft Visual Studio showing data from black friday sales including cost, sales prices, transportation fees, profits, losses, best selling list, and worst selling list

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