Find Us On: Facebook Twitter Rss Feed Blog
Need To Register? Sign Up Login

VB.net - Change Calculator

dickersonka
dickersonka 


The first program is a change calculator. The program should allow a me to enter the amount a customer owes and the amount of money the customer has paid. It should then calculate the amount of change, as well as the number of dollars, quarters, dimes, nickels and pennies returned to the customer. Do not worry about a situation where a amount owed is greater than the amount paid. You can assume the customer pays the exact amount or more. Clear the calculated amounts when a change is made to the amount owed or paid. Attachments
Tags Clarifications

Answers

VB.net - Change Calculator - Solution

dickersonka
dickersonka 



Attached is the solution to the VB.net - Change Calculator assignment including source and comments Attachments
ChangeCalculator.zip (13 K) Download






Preview
= New System.Windows.Forms.Label() Me.tbAmountOwed = New System.Windows.Forms.TextBox() Me.tbAmountPaid = New System.Windows.Forms.TextBox() Me.Label2 = New System.Windows.Forms.Label() Me.tbChangeDue = New System.Windows.Forms.TextBox() Me.Label3 = New System.Windows.Forms.Label() Me.btnCalculateChange = New System.Windows.Forms.Button() Me.btnClearScreen = New System.Windows.Forms.Button() Me.btnExit = New System.Windows.Forms.Button() Me.tbDollars = New System.Windows.Forms.

Preview
fields tbDollars.Text = "" tbQuarters.Text = "" tbDimes.Text = "" tbNickels.Text = "" tbPennies.Text = "" End Sub Private Sub tbAmountOwed_TextChanged(sender As Object, e As EventArgs) Handles tbAmountOwed.TextChanged tbChangeDue.Text = "" 'clear change fields tbDollars.Text = ""

Preview
Partial Friend Class MyApplication <Global.System.Diagnostics.DebuggerStepThroughAttribute()> _ Public Sub New() MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows) Me.IsSingleInstance = false Me.EnableVisualStyles = true Me.SaveMySettingsOnExit = true Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses End Sub <Global.System.Diagnostics.DebuggerStepThroughAttribute()> _ Protected Overr

Preview
information ' associated with an assembly. ' Review the values of the assembly attributes <Assembly: AssemblyTitle("ChangeCalculator")> <Assembly: AssemblyDescription("")> <Assembly: AssemblyCompany("Hewlett-Packard")> <Assembly: AssemblyProduct("ChangeCalculator")> <Assembly: AssemblyCopyright("Copyright © Hewlett-Packard 2014")> <Assembly: AssemblyTrademark("")> <Assembly: ComVisible(False)> 'The following GUID is for the ID

Preview
Global.System.Globalization.CultureInfo '''<summary> ''' Returns the cached ResourceManager instance used by this class. '''</summary> <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager Get If Object.ReferenceEquals(resourceMan, Nothing) Then Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.Reso

Preview
Private Shared addedHandlerLockObject As New Object <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs) If My.Application.SaveMySettingsOnExit Then My.Settings.Save() End If End Sub #End If #End Region Public Shared ReadOnly Property [Default

ChangeCalculator_Screenshot.png (13 K) Download Preview

Screenshots
Screenshot
Purchase Answer