Worksheet_5_(SLO) – 20 points

Due Date: Monday, May 14, 2018 on or before 11:30 p.m. (local time)

This document contains six (6) pages. Our fifth graded worksheet is stated as follows;???????????????

Students will create Visual Basic programs that will incorporate Object-Oriented Design. This SLO will cover chapter 11 of our textbook. This worksheet contains 5 Review Questions, each worth 4.0 points, for a total of 20 points. This worksheet must be completed independently by each online student.

 

Each review question is located on a page on its own. After careful reading of the text of each Review Question, place your completed response on the space provided under “Your Response”. Please also note that some of the review questions may contain multiple parts. Please provide your response, in the space provided under each part.

Please note: Careful consideration has been given to avoid any typing error, therefore, please “assume no errors on my part”. For instance, as you may encounter in the textbook the author has abbreviated the lengthy text within the parenthesis of the header of event procedure, as follows;

????????????????? “Private Sub objectName_event(…) Handles objectName.event

Please do not assume that the above code contains errors, however, if you encounter errors that would significantly alter your response, except the typing errors, such an extra hyphenation mark, then please contact me immediately via email, so that it be corrected.

Please further note: that all your responses (work) must be clearly shown on this Word document! After completing your worksheet, please upload your completed Word document, to the Canvas, not later than Monday, May 14, 2018 on or before 11:30 p.m. (local time), using the format Worksheet_5_(SLO)_Your Full-name” as the filename of your Word document. Please do not try to compress the Word document when you upload your completed work to Canvas.

Please be advised: Effective consistency with fundamental and basic programming materials covered in this course must be observed. It is strongly recommended, that your response to each review question would be consistent to basic programming topics that are covered in these chapters, or supplementary reading materials that are uploaded to the “Content” area link of Canvas Please refrain from including materials that may be found on the Internet or in other sources.

Failure to comply may results in obtaining a grade of “F” on this worksheet

?

 

Please enter the following information below:

Last Name: ___________________

First Name: ___________________

Student ID: ___________________

?

 

Reviewing Question_1:

  • In object-oriented programming terminology, what is the purpose of a user-defined class? Briefly give an example of a user-defined class.

?

  • Object Oriented Programming, is a style of programming incorporated in program development in Visual Basic. Briefly describe the following three OOP features.

?

  • Encapsulation
    ? Polymorphism
    ? Inheritance

? (No examples are required here, just a general explanation for each of three OOP features.)

Your Response:

 

 

 

 

 

 

?

?

?

?

?

?

?

 

.

Reviewing Question_2:

  • After a new class is defined, a new object of the class can be created. In some details describe how you would create a new object using a class.

?

  • Next, Write ONLY the necessary code to create an object of a class, and please assume we are concerned with “Code Objects”

?

  • Now, in this part, write ONLY the necessary code for a constructor that takes arguments and assigns the values FirstName and LastName to the instance variables of a class, Student.

Your Response:

 

 

 

 

 

 

 

 

 

 

 

?

?

.

Reviewing Question_3:

Please describe in some details the following:

  • What are property procedures and what is their purpose? Explain!

What statement or statements are used to assign or retrieve property values to the private members of the class module?

 

  • Suppose, NameString is an instance variable of a class, write Only the necessary code needed to create a property block called MyName and the necessary property procedures

Your Response:

(a)

?

?

?

?

?

?

?

???? ?(b)

?

 

?

?

 

 

 

 

 

.

Reviewing Question_4:

For this question, refer to Student class from Example 1(Semester Grade) of section 11.1 (PP 555-8 of your textbook), and

  • Determine the error(s), if any, in the following code segment.

 

Dim pupil As Student

Private Sub btnGo_Click(….) Handles btnGo.Click

????????????????????? Dim grade As String

??????? ???????pupil = New Student()

??????? pupil.CalcSemGrade = “A”

??????? grade = pupil.CalcSemGrade()???????

????????????? End Sub

 

  • Required: (replace only the statement (s) that you have identified as erroneous in part (a) above, and write your corrected code statements, necessary to obtain the desired results.

 

Your Response:

(a)

?

?

?

?

?

?????? (b)

?

?

?

 

 

 

.

Reviewing Question_5:

For this question, refer to Student class from Example 1(Semester Grade) of section 11.1 (PP 555-8 of your textbook). Suppose that mtbSSN is an ordinary (rather than a masked) text box. Write ONLY a block of code that alters the Set SocSecNum property procedure to raise the event ImproperSSN when the social security number does not have 11 characters. The event should pass the length of the social security number and the student’s name to the form’s code.

Your Response: