Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java program help needed ! public class Person { public static void main(String[] args) { // 1. Add some attributes to the Person class that

Java program help needed !

public class Person {

public static void main(String[] args) {

// 1. Add some attributes to the Person class that store appropriate data about a person.

// 2. Add some methods that allow the attribute values to be set.

// 3. Add another method called displayDetails() that outputs all the personal details stored about a person.

// 4. Within this main() method, create a new instance of the Person class (called 'p1')

// 5. Call each of the available set methods on the 'p1' instance.

// 6. Call the displayDetails() method to confirm the set methods have worked correctly.

// Extra. Create a Scanner object, and prompt the user for each detail of a person. Use the input data to setup a person object then display the details.

}

}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DB2 11 The Database For Big Data And Analytics

Authors: Cristian Molaro, Surekha Parekh, Terry Purcell, Julian Stuhler

1st Edition

1583473858, 978-1583473856

More Books

Students also viewed these Databases questions

Question

=+ c. A technological advance improves the production function.

Answered: 1 week ago