Presentation is loading. Please wait.

Presentation is loading. Please wait.

ASSIGNMENT OBJECTIVES

Similar presentations


Presentation on theme: "ASSIGNMENT OBJECTIVES"— Presentation transcript:

1 ASSIGNMENT OBJECTIVES
TO PRACTICE OR USE THE FOLLOWING: 1. CONTROLS: - buttons, labels, picture boxes, groupboxes, form, check boxes and radio buttons. 2. EVENTS: - Click 3. To learn how to use internal documentation 4. To learn how to place an icon into a button 5. To learn how to set properties in the Property Window. 6. To learn how to set properties in the code. 7. To learn how to use the check boxes and radio buttons. 8. To learn how to exit a program using Me.Close(). “Close” is a method (a behavior). 9. To learn how to accumulate using a counter variable. 10.To learn how to DIMension a variables. 11.To learn how to submit a program. 12. Use division and subtraction. 13. IF-THEN-ELSE 14. SELECT Statement 15. Functional level modules 16. Arguments and Parameters (both ByVal and ByRef) 17. Hierarchy (structure) charts 18. Classes: properties and methods 19. Regions: #Region “MODULE’S FUNCTION” ‘Your code goes here. #End Region Note: Items in red may be new for this assignment.

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 code and the person receiving code. I can get limited help from other students. For additional help, I need to see Dr. Scanlan, his assistant, or the tutoring center.

3 Programming Assignment 05
Due: May 1, 2014 30 POINTS: Purpose: You are to take program 4 and modify it so that it matches these requirements: 1. This program is EXACTLY like program 04 EXCEPT you will eliminate these modules: (1) ”Calculate Letter Grade Without + -”, and (2) “Calculate Letter Grade With + -”. Instead of these two modules, you will write and use two classes that perform these same functions. 2. See the class diagrams on the next slides for (1) the names of the two classes, (2) the properties in the classes and (3) the single method in each of these two classes. 3. You are to send the percentage score as a property value to the class and receive back the letter grade. You must use a FUNCTION procedure for the single method in each of the two classes. 4. You must use the names supplied in the class diagram on the next slide. 5. The grade cutoffs are CONSTANTS within the class. Thus, the user cannot SET these cutoffs, but the user will be able to GET them. These cutoffs are percentage cutoffs such as 90%, 80%, 70%, 60%, etc. and 97%, 93%, 90%, 87%, 83%, 80%, etc. 6. You must create the class in the new-project dialog box in the IDE. This class will be a file within your Solution file. The names of the files must be the class names: “clsLetterGradeWOPlusMinus” and “clsLetterGradeWPlusMinus”. 7. Don’t forget to use internal documentation within these classes. 8. The following slides will give you more information on what to do. 9. You are to use #Region…#End Region on all modules of code. (See next slide.) 10. You must use Option Strict ON 11. ASK QUESTIONS IN CLASS IF YOU DO NOT UNDERSTAND SOMETHING. Necessary prerequisites 1. Chapters 1, 2, 3, 4, 5,6, 12 2. Notes: Notes Chapters 1,2,3,4,6,12 5. GroupBoxes 6. Subtraction and division 7. ByVal and ByRef 8. Try/Catch 9. Classes: properties and methods 10. Message box 11. Hierarchy chart. 12. Class Lectures

4 IMPORTANT: Notice how nicely the regions organize your code.
Programming Assignment 05 Use the names given below for your Regions How to define a region: #Region “MODULE’S FUNCTION” ‘Place your code here. #End Region IMPORTANT: Notice how nicely the regions organize your code.

5 Programming Assignment 05
This diagram of the class is called a CLASS DIAGRAM. Class name clsLetterGradeWOPlusMinus PercentageScore A_Cutoff B_Cutoff C_Cutoff D_Cutoff ComputeLetterGrade Properties Note: THE NAME OF THIS METHOD HAS BEEN CHANGED FROM ComputeGrade TO ComputeLetterGrade. Change your code! (Reason: The new name is a better name.) Method

6 Programming Assignment 05
Eliminate this module and add the module below. Call the module below from the “GradesWithout+ -” module. Sub CalculateLetterGradeWithoutPlusAndMinus(ByVal decPercentageScore As Decimal, _ ByRef strLetterGrade As String) Dim objLetterGradeWOPlusMinus As New clsLetterGradeWOPlusMinus ‘ PLACE YOUR CODE HERE. ‘ THIS CODE WILL USE YOUR CLASS TO CALCULATE THE LETTER GRADE. ‘ THIS MODULE HAS NO CASE LOGIC IN IT. THE CASE LOGIC IS NOW IN YOUR CLASS. ‘ Use decPercentageScore to SET the PercentageScore property. ‘ Use the ComputeLetterGrade method to return the letter grade from the class. End Sub

7 Programming Assignment 05
This diagram of the class is called a CLASS DIAGRAM. Class name clsLetterGradeWithPlusMinus PercentageScore A_Plus_Cutoff A_Cutoff A_Minus_Cutoff B_Plus_Cutoff Continue with other Cutoffs… ComputeLetterGrade Properties Note: THE NAME OF THIS METHOD HAS BEEN CHANGED FROM ComputeGrade TO ComputeLetterGrade. Change your code! (Reason: The new name is a better name.) Method

8 Programming Assignment 05
Eliminate this module. Add this module and call it from the “GradesWith+ -” module. Sub CalculateLetterGradeWithPlusAndMinus(ByVal decPercentageScore As Decimal, _ ByRef strLetterGrade As String) Dim objLetterGradeWithPlusMinus As New clsLetterGradeWithPlusMinus ‘ PLACE YOUR CODE HERE. ‘ THIS CODE WILL USE YOUR CLASS TO CALCULATE THE LETTER GRADE. ‘ THIS MODULE HAS NO CASE LOGIC IN IT. THE CASE LOGIC IS NOW IN YOUR CLASS. ‘ Use decPercentageScore to SET the PercentageScore property. ‘ Use the ComputeLetterGrade method to return the letter grade from the class. End Sub

9 SUB PROCEDURE DOCUMENTATION
AN EXAMPLE OF HOW INTERNAL DOCUMENTATION MUST BE DONE. Fig 2-330 INTERNAL DOCUMENTATION EXAMPLE PROGRAM DOCUMATION The program must have documentation at its beginning. You MUST use this form for your programs. SUB PROCEDURE DOCUMENTATION Each procedure must have documentation at its beginning. You MUST use this form for your programs. The heading must be all caps and contain no more than four words.

10 SUB PROCEDURE DOCUMENTATION
AN EXAMPLE OF HOW INTERNAL DOCUMENTATION MUST BE DONE. Fig 2-350 INTERNAL DOCUMENTATION EXAMPLE SUB PROCEDURE DOCUMENTATION Each procedure must have documentation at its beginning. You MUST Use this form for your programs. The heading must be all caps and contain no more than four words.

11 Programming Assignment 05
READ NOTES ON CHAPTER 12 AND READ CHAPTER 12 IN THE BOOK. You must use Form-A and Form-B for this assignment, not previous assignments >>>>>>>>>>>>

12 Programming Assignment 05
Form-A Form-A STUDENT FILLS IN THESE BLANKS: LAST NAME (PRINT):_______________________________ FIRST NAME (PRINT):________________________ PROGRAM (Circle) DATE DUE: May 1, 2014 DATE SUBMITTED:___________________ GRADER FILLS IN THESE BLANKS: DESCRIPTION POINTS POINTS EARNED Correct internal documentation within classes, too: 0 OR 2 _____________ Reasonably correct GUI: OR 1 _____________ A-thru-F part runs correctly using nested If-Then-Else: 0 OR 12 _____________ With plus/minus runs correctly using Select statement: OR _____________ Proper style for object names: OR 1 _____________ Proper style for variable and constant names 0 OR 2 _____________ Failure to submit program correctly (See Form-B) 0 OR -2 _____________ Using textbox outside of Validate Data module: 0 OR -30 _____________ (Exception: You must clear the textbox, also.) Improper use of ByVal or ByRef. For each occurrence: 0 OR -15 _____________ Using more than one module-level variable in the form code: 0 OR -30 _____________ Incorrect input error checking. For each occurrence: 0 OR -15 _____________ Failure to modularize according to the hierarchy chart: 0 OR -30 _____________ Failure to substitute classes for each of the two modules: OR _____________ Failure to use two files for your two classes: OR _____________ Failure to use the names given in this assignment: class names, method names, and property names OR _____________ Failure to use regions as indicated on slide OR _____________ Failure to use OPTION STRICT ON OR -10 Late penalty (5 points off for each class day late.): _____________ TOTAL POINTS OUT OF A POSSIBLE 30: _____________ Form-A is continued on the next page >>>>>

13 Programming Assignment 05
Form-A Form-A FORM A CONTINUED: Comments:_______________________________________________________________________________________ _________________________________________________________________________________________________

14 CUT OUT THIS FORM ALONG THE DOTTED EDGES AND TAPE IT TO THE ENVELOPE.
Form-B Form-B CUT OUT THIS FORM ALONG THE DOTTED EDGES AND TAPE IT TO THE ENVELOPE. YOU MUST USE THIS STYLE THAT IS ABOUT THE SIZE OF YOUR CD-R or DVD-R. Do not lick to seal. Use metal clip. NOTE: You may also use the self sealing type of envelope found in the bookstore. STUDENT FILLS IN THESE BLANKS: LAST NAME (PRINT) :_______________________________ FIRST NAME (PRINT):________________________ PROGRAM (Circle) DATE DUE:_________________ DATE SUBMITTED:__________________ PLACE A CHECK NEXT TO THE FOLLOWING: ____ Save the Program on a CD-R or DVD-R using the following folder and sub-folder: Your Name\Program 04 ____ Print your full name and program number on the CD-R or DVD- R using a permanent black marker. ____ Sign your full name with permanent black marker on the CD or DVD. ____ Submit the CD-R or DVD-R in required envelope style not much larger than the CD-R or DVD-R. ____ Place the CD-R or DVD-R in the envelope. ____ Cut out this form along dotted edges and TAPE it to the envelope. ____ Be sure a working program is on the disk and it can be read. Zero points if PROGRAM is not on the disk or can’t be read. If not submitted correctly 5 points will be deducted from your score.!!

15 Program #5 Spring 2014 Form-B Form-B CUT OUT THIS FORM ALONG THE DOTTED EDGES AND TAPE IT TO THE ENVELOPE. YOU MUST USE THIS STYLE THAT IS ABOUT THE SIZE OF YOUR CD-R or DVD-R. Do not lick to seal. Use metal clip. NOTE: You may also use the self sealing type of envelope found in the bookstore. STUDENT FILLS IN THESE BLANKS: LAST NAME (PRINT) :_______________________________ FIRST NAME (PRINT):________________________ PROGRAM (Circle) DATE DUE:_________________ DATE SUBMITTED:__________________ PLACE A CHECK NEXT TO THE FOLLOWING: ____ Save the Program on a CD-R or DVD-R using the following folder and sub-folder: Your Name\Program 05 ____ Print your full name and program number on the CD-R or DVD- R using a permanent black marker. ____ Sign your full name with permanent black marker on the CD or DVD. ____ Submit the CD-R or DVD-R in required envelope style not much larger than the CD-R or DVD-R. ____ Place the CD-R or DVD-R in the envelope. ____ Cut out this form along dotted edges and TAPE it to the envelope. ____ Be sure a working program is on the disk and it can be read. Zero points if PROGRAM is not on the disk or can’t be read. If not submitted correctly 5 points will be deducted from your score.!!


Download ppt "ASSIGNMENT OBJECTIVES"

Similar presentations


Ads by Google