Create application that simulates functionality of gas pump

Assignment Help Computer Engineering
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.

Reference no: EM131308953

Questions Cloud

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?

Reviews

Write a Review

Computer Engineering Questions & Answers

  What do you mean by sensitivity analysis how would you use

what is a sensitivity analysis? how would you use it in planning for future expansions? what role does this kind of

  Execute the boolean functions

Execute the Boolean functions

  Data integration and etl

Write down the data integration and ETL. How are they related? What is the data warehouse and state its benefits?

  How the style attribute is replacing some elements

The style attribute is replacing many elements in the always-evolving HTML world. Many features that were implemented using elements in older versions of HTML are now implemented using the style attribute.

  Contain reference slide with citations in apa format

build a 5- to 7-slide Microsoft?PowerPoint?presentation detailing the evolution of programming languages. Organize your slide presentation in the form of a timeline, and discuss the various generations of programming language.

  How to display the largest and smallest amount of tax

Ask users for the past 5 years of federal taxes they have paid, save this data to an array, search for the largest and the smallest amount of tax, and show it on the screen.

  Describe napoleons army march toward and eventual retreat

As you do this assignment, consider the historical data visualization developed by Charles Minard describing Napoleon's army march toward and eventual retreat from Moscow (Found in this week's presentation).

  Define it priorities and governance for it without

using a company of your choice determine the strategic business goals. develop an it strategy that aligns to the

  Assess the importance of a systems development life cycle

write a five to six 5-6 page paper in which youdetermine within the health care setting the main features capabilities

  Write a program that reads in a line of text, counts

Output of the letter count is a loop running from 0-25, with an if statement that allows output if the array entry isn't zero.

  Investigate clinical decision support applications and

investigate clinical decision support applications and provide a summary of at least two of the applications that you

  Make use of a regularexpressionvalidator control

make Use of Visual Studio.NET 2005 to create an ASP.NET project with four aspx forms. Use Master Pages to display a company name selected by your group at the top each form.

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