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

  Draw a sketch of the user interface

Listed below are the four steps you should follow when planning an 00 application. Put the steps in the proper order by placing a number (1 through 4) on the line to the left of the step. Draw a sketch of the user interface. Identify the tasks the ..

  Create a app that calculates a salesperson commission

Develop an application that calculates a salesperson's commission from the number of items sold. Assume that all items have a fixed price of $10 per unit. Use a Select Case statement to implement the following sales commission schedule:

  Do not allow the user to resize the form.

Remove minimize, maximize, and close buttons from the title bar

  Display in message label when statements are executed

What will display in MessageLabel when the following statements are executed? Assume that CountInteger = 10. MessageString = "Visual Basic is fun" IF CountInteger

  Create a windows application that functions like a banking

Create a Windows application that functions like a banking account register. Separate the business logic from the presentation layer (create a class with all the methods and properties).

  Car rental agency assignment

PROJECT GUI MINIMUM REQUIREMENTS - Combo boxes, Option Buttons, and Checkboxes must interact with at least one Text Field or other control and a minimum of two fields must not be editable and their contents must be generated from other component inte..

  Performing a calculation on that value

Individual Visual Logic Calculations. Select two to three Each task must include the following Inputing a value. Performing a calculation on that value. outputting the value. produce Visual Logic files to execute each of these steps.

  Gas pumpa gas pump calculates the cost of gas at a local

gas pumpa gas pump calculates the cost of gas at a local gas station. the station charges 2.69 per gallon for regular

  Diagnose a person heartbeat

Write a program to request a person's age and resting heart rate as input and display their THR.

  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?

  Applicaion for menu design

The user selects the Clear menu to clear the form.

  Add the functionality to its cash register

The Chocolate Delights Candy Company needs to add the following functionality to its cash register: When a customer is checking out, the cash register needs to store the required data pertaining to each item the customer is buying

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