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

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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