Reference no: EM131308953
Lab Assignments
Methods
Objectives
In this lab assignment, students will learn:
- How to define methods and functions
- How to call methods or functions
- How to specify parameters and how to pass arguments by value
Goals
In this lab assignment, students will demonstrate the abilities to:
- Define methods and functions
- Call methods or functions
- Specify parameters and pass arguments by value
- Design and create a GUI
- Create correct event handler methods
- Define and call methods or functions correctly
- The program can be compiled and executed without error
In this lab assignment, you will create a "Gas Pump" application. A gas pump calculates the cost of gas based on the grade of gas. The station charges
$2.69 per gallon for Regular grade gas
$2.79 per gallon for Special grade gas
$2.89 per gallon for Super grade gas
Create a windows form application that simulates the functionality of the gas pump.
The user enters the number of gallons to purchase in a TextBox.
Click the desired grade button (each grade is represented by a Button whose Text properties are set to Regular, Special and Super).
The total cost will be calculated and displayed on the form.
In each Button's Click event handler methods -
Read user's input from TextBox.
Call a function to calculate total cost by passing number of gallons and grade of gas. The grade of gas can be retrieved from the Text property of each Button.
Display the total cost on the form.
Define a function to calculate total cost. This function
Requests the values of number of gallons and grade of gas ("Regular", "Special" or "Super").
Calculates total cost.
Returns the total cost.
Harming health care physicians
: According to our text studies show that defensive medicine seems to be harming health care physicians are acting out of fear for malpractice suits and their actions are not beneficial to the treatment of the patient it is increasing health care co..
|
Cash flows over the four-year life of the investment
: An investment has an installed cost of $571,382. The cash flows over the four-year life of the investment are projected to be $200,584, $244,318, $192,674, and $160,313. If the discount rate is zero, what is the NPV? At what discount rate is the NPV ..
|
Find excerpts on the humane society website
: Imagine that you're writing a report about pet overpopulation. Find excerpts on the Humane Society website and want to incorporate the information into your report.
|
What was the hoped-for result on c i and y
: The rate cut was made because European countries were growing very slowly or were in recession. What effect did the bank hope the action would have on the economy? Be specific. What was the hoped-for result on C, I, and Y?
|
Create application that simulates functionality of gas pump
: CSC139 Chapter 6 Lab Assignments- Create a windows form application that simulates the functionality of the gas pump. The user enters the number of gallons to purchase in a TextBox.
|
Describe the four costs of quality
: Describe the four costs of quality. Explain what each cost is and the two that every operations manager must omit from daily operations. Defend your response with examples. 700 words paper
|
The normative theories of business ethics
: Select one of the normative Theories of Business Ethics (either Stockholder Theory, Stakeholder Theory or Social Contract Theory) and describe the basic tenets of the framework and explain how it can be applied. ?
|
Budgeting process of a health care
: This assignment will require you to consider several influences to the budgeting process of a health care institution. Here, you will review payer mix and other influences to revenue as you consider revenue factors for the budget. Complete the fol..
|
How mr. peabody should decide how much money to hold
: Suppose the interest rate rises to 15 percent. Find Peabody's optimal money holdings at this new interest rate. What will happen if the interest rate increases to 20 percent?
|