Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use the SafeInput Library as needed to validate the user inputs; Block and Repeat until the user gets the input correct, do not terminate the

Use the SafeInput Library as needed to validate the user inputs; Block and Repeat until the user gets the input correct, do not terminate the script
image text in transcribed
Part 1: Writing to a text file: 1. Create a Person.java class to represent a Person Object. Person Fields String ID: String firstName: String lastName: String title: Mr. Mrs., Ms, Prol, Dr. Hon int YO; - Year of Birth - Range should be 1940-2010 - make sure validations hacen in the constructor as well as the setter method Methods Constructor Getters and Setters public String fullName) returns a concatenation of the first and last names public String for a Name) returns a concatenation of these and the full name public static int getAge(int year) - A static method that takes a year and returns an age - Use the Calendar ObjectRequires a bit of web search) public String to svatarecord) -returns a comma separated value osv) String suitable to writing to ajava text file - Make sure to use this function when saving data to the file. - e., 0001John Doe M. 2000 2. Create a program (Java main class called Personenerator.java a user will input the data to the console . a Person object is created for each entry Store all the person objects in an ArrayLister Export all the Person objects to a text file using the tocs Data Recordt method Grading The program runs with no errors The Person class includes all the fields and methods specified above Usage of the Calendar object to calculate age in the getAge method The program properly instantiates objects using the class constructor The program properly stores the objects in an ArrayList. Proper usage of Git and GitHub (frequent commits, explanatory commit messages Part 2: Person Reader: 1. Create a program (Java main class) called PersonReader.java Use the FileChooser to prompt the user to select the file you export in Part 1 Instantiate a Person Object for each record you read from the file Store all the Person Objects in an ArrayList Person Use the String.format or System.out.printf method to create any formed columnar display of the data ID Firstname Lastname Title YOB Doe 1990 2001 John 2002 Jane

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

Database Processing

Authors: David M. Kroenke

12th Edition International Edition

1292023422, 978-1292023427

More Books

Students also viewed these Databases questions

Question

Identify IPv6 addresses that can be routed on the IPv4 Internet.

Answered: 1 week ago

Question

What is Accounting?

Answered: 1 week ago

Question

Define organisation chart

Answered: 1 week ago

Question

What are the advantages of planning ?

Answered: 1 week ago