Download presentation
Presentation is loading. Please wait.
Published byLucinda Hancock Modified over 8 years ago
1
1 ASSIGNMENT OBJECTIVES LEARN TO USE: 1. Textboxes, labels, buttons, picture boxes, properties, and methods 2.Arithmetic computations 3.Variables and constants 4. Me.Close() 5.FormatCurrency() and FormatNumber() functions 6.Use Google for help on FormatCurrency and FormatNumber. 7. Clearing labels and textboxes 8.Background colors. DIFFICULTY LEVEL:EASY TUTORING CENTER IS NOW OPEN: THIRD FLOOR OF TAHOE START ON THE PROGRAM NOW.
2
2 GETTING HELP: You may ask another student for help, but you must not copy their code. Failure of the course will result for the person giving the code and the person receiving the code. REMEMBER: THE GRADES IN THIS COURSE ARE CURVED. I can get limited help from other students. For additional help, I need to see Dr. Scanlan, or the tutoring center.
3
3 1. The GUI MUST look almost exactly like the ones displayed in slides 4, 5, and 6. 2. Use FormatCurrency() and FormatNumber() functions to display the amounts. Note where dollar signs are displayed or not displayed. 3.Number of controls: a.2 Textboxes b.2 Picture Boxes c3 Button d.1 Form e.All the others are labels. 4.Use Me.Close to close the program and a Clear button to clear the form output and entries. 5.Use any picture of a coffee shop you can find by searching Google Images. 6.Note that the taxes and deductions are so high that the person never takes home any money. Due Date: March 5, 2015 Points: 20 Late penalty: 50% per class day Programs are ONLY accepted at the start (first 20 minutes) of the class period on the date due. After that, it will be late. General Requirement: Create a payroll calculator for a Coffee Shop Specific Requirements: The program GUI must look and perform like the ones in this assignment. See the posted Exec file on the Web site
4
4 This is what the GUI looks like when the program is first run with no values entered.
5
5 This is what the GUI looks like when the program is run with values entered and the Calculate Pay button has been pressed.
6
6 This is what the GUI looks like when the program has been run with values entered followed by the Clear button being pressed. All values have been cleared. Clear button was pressed
7
7 Specific requirements (continued) 7. You MUST use these names and formats for your variables and constants. Note: You must use constants for calculations. 'VARIABLES are locations in memory where values are to be stored. The values in these locations CAN be changed when the progam is ‘ executing. Dim decHoursWorked As Decimal Dim decPayRate As Decimal Dim decGrossPay As Decimal Dim decFederalTax As Decimal Dim decStateTax As Decimal Dim decCarbonTax As Decimal Dim decMedicalInsurance As Decimal Dim decDentalInsurance As Decimal Dim decVisonInsurance As Decimal Dim decNetPay As Decimal Dim decTotalTaxes As Decimal Dim decTotalOtherDeductions As Decimal 'CONSTANTS are locations in memory where values are to be stored. The values in these locations CANNOT be changed when the progam is ‘ executing. Const decFEDERAL_TAX_RATE As Decimal = 0.3D Const decSTATE_TAX_RATE As Decimal = 0.1D Const decCARBON_TAX_RATE As Decimal = 0.4D Const decMEDICAL_INSURANCE_RATE As Decimal = 0.1D Const decDENTAL_INSURANCE_RATE As Decimal = 0.05D Const decVISION_INSURANCE_RATE As Decimal = 0.05D
8
8 Public Class Form1 'Note: Put Constants here if there are any. 'Const ExampleTaxRate as Decimal =.10D 'Note: Declare Variables here for now. Dim decGrossPay As Decimal Dim decPayRate As Decimal Dim decHoursWorked As Decimal 'CALCULATE GROSS PAY Private Sub btnCalculatePay_Click(sender As System.Object, e As _ System.EventArgs) Handles btnCalculatePay.Click decPayRate = CDec(txtPayRate.Text) decHoursWorked = CDec(txtHoursWorked.Text) decGrossPay = decPayRate * decHoursWorked lblDisplayGrossPay.Text = FormatCurrency(decGrossPay) End Sub End Class How to setup code for a simple example for your program #1. Place your code in these areas. Note how values are calculated below using Variables Ignore red lines below. SOME EXTRA HELP
9
9 Form-A GRADER FILLS IN THIS PAGE: PRINT LAST NAME:_______________________________ PRINT FIRST NAME:________________________ PROGRAM (Circle) 1 2 3 4 5 6 7 8 9 DATE DUE:_____________________ DATE SUBMITTED:___________________ GRADER FILLS IN THESE BLANK DESCRIPTIONPOINTSPOINTS EARNED Appropriate GUIs: 0 OR 2_____________ Used Variable names and constants correctly0 OR 4_____________ Program runs correctly: 0 OR 14_____________ Late penalty: -10 pts/class day_____________ Zero points if the program fails to compile. TOTAL POINTS OUT OF A POSSIBLE 20:_____________ FAILURE TO HAND IN THE PROGRAM ACCORDING TO THE REQUIRED PROCEDURE: see next slide: -5 points Additional comments below: Spring 2015
10
10 Form-B STUDENT FILLS IN THESE BLANKS: LAST NAME:_______________________________ FIRST NAME:________________________ PROGRAM (Circle) 1 2 3 4 5 6 7 8 DATE DUE:_________________ DATE SUBMITTED:__________________ PLACE A CHECK NEXT TO THE FOLLOWING: 1.____Saved the Program on a CD-R or DVD-R using the following directory and sub-directory: Drive Letter:\Your Name\Program1 2.____Printed your full name and program number on the CD using a permanent black marker. 3.____Submitted the CD-R or DVD-R in an envelope not to much larger than the CD or DVD-R 4.____Placed the CD or DVD-R in the envelope.. 5.____Cut out this form along dotted edges and securely tape it to the envelope. CUT OUT THIS FORM ALONG THE DOTTED EDGES AND TAPE IT TO AN ENVELOPE ABOUT THE SIZE OF A CD-R OR DVD-R.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.