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 steps and tools are available for you to protect

What steps and tools are available for you to protect your family (especially your children) from these internet dangers?

  You will be developing a human elements in it strategy

you will select a real or fictitious organization and apply your research to the development of a strategy that would

  How many ram chips are there per memory word

How many RAM chips are necessary? How many RAM chips are there per memory word? How many address bits are needed for each RAM chip? How many banks will this memory have? How many address bits are needed for all of memory?

  Questionyour companys it department experiences a great

questionyour companys it department experiences a great deal of conflict in connection with its projects. there is a

  What is the name of the scanning application

What is the name of the scanning application that is better for performing a software vulnerability assessment with suggested remediation steps?

  Troubleshooting the infected system

AV software has eliminated the malware from a highly infected system. After first reboot, an error message is displayed which consists of a reference to the strange DLL file which is missing.

  Question1 what are the methods of defense and provide

question1. what are the methods of defense and provide examples? how do you deal with the damage?2. explain fundamental

  In software engineering one can find out various life cycle

in software engineering one can find various life cycle models. some examples include the waterfall model agile

  Transcripting the case

The CTO of organization that has requested your services would like for your forensics team prepare a transcript of what you could state to CTO.

  Write down a program to test class rectangle

make a class Rectangle. The class has attributes length and width, each of which defaults to 1. It has methods that calculate the perimeter and the area of the rectangle

  Write down a c++ program that has a class called flight

Write down a C++ program that has a class called flight.

  What is role of kcc and its relationship to rule of three

What is the role of KCC and its relationship to the rule of three? What are the different criteria that can force replication to occur? How does Active Directory handle simultaneous changes?

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