Write a class called Person.java that has instance variables matric number, name, date of birth, and gender. Use appropriate data types for these instance variables. Include constructor and set and get methods for all instance variables. Draw UML diagram for class Person.

Then, create an application class that asks the user to supply the required information for a Person object and then instantiates a Person object.

Recommended Answers

All 2 Replies

I'm starting to remember why I stopped visiting the forums.

Good job, you pasted your homework assignment. Why are you sharing it? Have a specific question?

Write a class called Person.java that has instance variables matric number, name, date of birth, and gender. Use appropriate data types for these instance variables. Include constructor and set and get methods for all instance variables. Draw UML diagram for class Person.

Then, create an application class that asks the user to supply the required information for a Person object and then instantiates a Person object.

at least make some effort!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.