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

  Design a bcp based off of the sangrafix company profile

You have been hired as a consultant to design BCP for SanGrafix, a video and PC game design company. SanGrafix's newest game has become a hot seller, and the company anticipates rapid growth.

  What happen if you did not break

When using Case statements, what would happen if you did not "Break?" Please give an example and explain. Where, in your everyday life, would you use all of the looping techniques.

  How the adoption of the technology affects

Your mandate as VP of Technology is to keep the regular projects strong and growing, plan for TechnoSeniors, and overhaul the AllTechComm intranet. Your must make the intranet one in which volunteers could sign up and manage their schedules, profi..

  The shipping clerk at the rinky dooflingy company is faced

Write a program that reads the number of dooflingies to be shipped and displays the number of huge, large, medium, and small containers needed to send the shipment in the atleast number of containers and with the minimum amount of wasted space.

  Mutual authentication and key establishment protocol

Assume a server-assisted mutual authentication and key establishment protocol. Suppose that Alice and the Server share the pairwise symmetric key KAS; however Bob and Server share a pairwise symmetric key KBS.

  Program meeting the least program requirements

Incorporate ADO.NET access to at least three Microsoft Access data tables. These tables must include Customers, Products (the kinds of products offered, cost, sales price, and quantity on hand), and Sales information (a combination of customer and..

  Describe the two features of the windows firewall

Describe, in your own words, the two features of the Windows Firewall in Windows Server 2012 that you believe are most useful to users.

  Make a phonebook application using c++

make a Phonebook application using C++ STL (standard template library). Use the telephone number as the key and the name as the value.

  Write a gui-based program that manages an auction

Write a GUI-based program that manages an auction of several items.

  Why coyolxauhqui is a red-tailed boa

Give a critical evaluation of each of the following passages

  What kind of os to use along with the file system and

the cto informed you that the board of executives showed great interest in building a new network based on the work you

  Question 1interpret the case study underneath and answer to

question 1interpret the case study underneath and answer to the questions that followunited parcel service throughout

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