sing in any (GUI) graphical programming language Objectives Practice using objects. protect the user with interface design.  how to use date controls  Decision statements and practice basic date math.    Create one object – Person, and code it. Create the menus shown in the demo program. The interface is a bit different from what you have done to this point. Play with the program to see how it works. The hungarian notation for a date control is dte. Commands The key commands of this program are: Add a Person Remove a Person Display next person Display previous person Display first person Display last person. Create the programming to make these components work. Refer to the power point notes for examples of how the code needs to be set up. Protecting Data against Accidental change Change the display to allow the user to enter data into text boxes, but protect the data from being accidentally changed by setting the ReadOnly property of the text boxes appropriately. This should be a sub. Call it as you need it. The Date has no ReadOnly property, use the Enabled property instead for this control. Use the enabled property for the Date/Time picker. Age Calculation

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Using in any (GUI) graphical programming language

Objectives

  • Practice using objects.
  • protect the user with interface design.
  •  how to use date controls
  •  Decision statements and practice basic date math.

 

 Create one object – Person, and code it. Create the menus shown in the demo program. The interface is a bit different from what you have done to this point. Play with the program to see how it works. The hungarian notation for a date control is dte.

Commands

The key commands of this program are:

Add a Person

Remove a Person

Display next person

Display previous person

Display first person

Display last person.

Create the programming to make these components work. Refer to the power point notes for examples of how the code needs to be set up.

Protecting Data against Accidental change

Change the display to allow the user to enter data into text boxes, but protect the data from being accidentally changed by setting the ReadOnly property of the text boxes appropriately. This should be a sub. Call it as you need it. The Date has no ReadOnly property, use the Enabled property instead for this control. Use the enabled property for the Date/Time picker.

Age Calculation

Calculate the age of the individual in the Person object and display it in the age label as we change who we are looking at. The functions you need are:

Now() – gives the current date. It has several helpful properties

Month – the month of the date in the data

Day – the day of the date in the data

Year – the year of the date in the data

Remember the age depends on whether the day and month of the birthday has already occurred in the current year. The age determination should code like this:

If Birth.Month < Now.Month then

                Age = Now.Year – Birth.Year                          ‘Have had birthday

ElseIf birth.Month = Now.Month And birth.Day <= Now.Day then

                                Age = Now.Year – Birth.Year          ‘Have had birthday

Else

                Age = Now.Year – Birth.Year – 1                   ‘Haven’t had birthday yet 

End If

Where should you place this code in the Person object?

Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY