Question
In Java, how can I create the following: -Create an abstract class called Client.java to allow for three abstract methods the bank needs to process.
In Java, how can I create the following:
-Create an abstract class called Client.java to allow for three abstract methods the bank needs to process. Name your methods readData(), processData() and printData(). No arguments are needed for your methods.
-Create a BankRecords.java file which will utilize the Client asbtract methods and generate ultimately the client records from the csv file.
The client file has the following header information
id {string}
age {numeric}
sex {FEMALE,MALE}
region {INNER_CITY,TOWN,RURAL,SUBURBAN}
income {numeric}
married {NO,YES}
children {0,1,2,3}
car {NO,YES}
save_act {NO,YES}
current_act {NO,YES}
mortgage {NO,YES}
pep {YES,NO}
Create instance fields for each header item above in your class.
Include getter and setters for each instance field.
-Include code definitions for each method declared in your Client class as follows
Your readData() method should read in all the record data from the csv file in your
path into an ArrayList.
Your processData() method should take all the record data from your ArrayList and add the data into each of your instance fields via your setters. Use an array of objects to store record data for each instance field.
Your printData() method should print the first 25 recordsfor various fields to the console via your getters. Print records for the following fields:
ID, AGE, SEX, REGION, INCOME, and MORTGAGE.
-Include headings in your print detail. Printing record detail should be in a neat columnar style format.
Make sure to include a try catch block when reading any file! Include proper exception handling.Include your projects entire source code/csv fileinto a zip file, a jar file of your program, as well as your console output into a doc file for credit
The following is a snapshot of the csv file:
d12101 48 FEMALE INNER CI 22467 YES 40 MALE 51 FEMALE INNER_CI 16575.4 NO 23 FEMALE TOWN 57 FEMALE RURAL 57 FEMALE TOWN 22 MALE 58 MALE 37 FEMALE SUBURBAI 25304.3 YES 54 MALE TOWN 66 FEMALE TOWN 52 FEMALE INNER_CI 266222.8 NO 44 FEMALE TOWN 66 FEMALE TOWN 36 MALE 38 FEMALE INNER_CI 22342.1 YES 37 FEMALE TOWN 46 FEMALE SUBURBAI 41016 YES 62 FEMALE INNER_CI 26909.2 YES 31 MALE TOWN 61 MALE INNER_CI 57880.7 YES 50 MALE 54 MALE 27 FEMALE TOWN 22 MALE INNER CI 12640.3 NO id12102 id12103 id12104 id12105 id12106 id12107 id12108 id12109 id12110 id12111 TOWN 32825 NO 20375.4 NO 50576.3 NO 37869.6 YES 8877.07 YES 24946.6 NO RURAL TOWN 3 24212.1 YES 59803.9 YES id12113 id12114 id12115 id12116 id12117 id12118 id12119 id12120 id12121 15735.8 YES 55204.7 YES 19474.6 YES RURAL 17729.8 YES 22522.8 YES TOWN id12123 id12124 16497.3 YES INNER CIT 38446.6 YES 15538.8 NO
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started