Create the a Person class with the following: Class Variables String firstname String lastname int birthmonth int birthday int birthyear String ssn All variables above should be private. Constructor The main constructor should take in all values and assign them to their respective private class variables Methods Create a public getters and setters for firstname and lastname and SSN getFirstname getLastname setFirstname setLastname Create a public getter method called getBirthdate, which will return a String composed of their birthday in month/day/year format. For example, if birthmonth=3, birthday=22, birthyear=2000, it should return the String "3/22/2000" Create a public method called verifySSN that takes in a String parameter and returns a boolean. It will check the parameter against the person's SSN and return true or false based on whether they match

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter11: Inheritance And Composition
Section: Chapter Questions
Problem 3PE: Chapter 10 defined the class circleType to implement the basic properties of a circle. (Add the...
icon
Related questions
Question
100%

Create the a Person class with the following:

Class Variables
String firstname
String lastname
int birthmonth
int birthday
int birthyear
String ssn
All variables above should be private.

Constructor
The main constructor should take in all values and assign them to their respective private class variables

Methods
Create a public getters and setters for firstname and lastname and SSN
getFirstname
getLastname
setFirstname
setLastname

Create a public getter method called getBirthdate, which will return a String composed of their birthday in month/day/year format. For example, if birthmonth=3, birthday=22, birthyear=2000, it should return the String "3/22/2000"

Create a public method called verifySSN that takes in a String parameter and returns a boolean. It will check the parameter against the person's SSN and return true or false based on whether they match.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 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
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
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage