Define a class called dateType, to store person's date of birth. The structure of the class should be like this; dateType -dMonth: int -dDay: int -dYear: int +setDate(int, int, int): void +getDay() const: int +getMonth() const: int +getYear() const: int +printDate ( ) const: void +dateType (int = 1, int = 1, int = 1900) The dateType class has the following private members:

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter11: Advanced Inheritance Concepts
Section: Chapter Questions
Problem 5RQ
icon
Related questions
Question

Write a Java code.

and implements the following public functions:
1. Implement the appropriate setter and getter of a class.
2. SetDate function to set the values of its member's variables.
3. PrintDate function that display the date of birth of a person.
Use appropriate main () function that Test the functionality of class by Creating an array of 5 instance of
dateType class.
Transcribed Image Text:and implements the following public functions: 1. Implement the appropriate setter and getter of a class. 2. SetDate function to set the values of its member's variables. 3. PrintDate function that display the date of birth of a person. Use appropriate main () function that Test the functionality of class by Creating an array of 5 instance of dateType class.
Define a class called dateType, to store person's date of birth. The structure of the class should be like
this;
dateType
-dMonth: int
-dDay: int
-dYear: int
+setDate(int, int, int): void
+getDay() const: int
+getMonth(O const: int
+getYear() const: int
+printDate() const: void
+dateType (int = 1, int = 1, int = 1900)
The dateType class has the following private members:
dMonth of type int;
dDay of type int;
dYear of type int;
Transcribed Image Text:Define a class called dateType, to store person's date of birth. The structure of the class should be like this; dateType -dMonth: int -dDay: int -dYear: int +setDate(int, int, int): void +getDay() const: int +getMonth(O const: int +getYear() const: int +printDate() const: void +dateType (int = 1, int = 1, int = 1900) The dateType class has the following private members: dMonth of type int; dDay of type int; dYear of type int;
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Class
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,