1- Write a java program that stores, retrieves, adds, updates and search addresses as shown in figure. Use a fixed-length string for storing each attribute in the address. Use random access file(.dat)...


1- Write a java program that stores, retrieves, adds, updates and search addresses as shown in<br>figure. Use a fixed-length string for storing each attribute in the address. Use random access<br>file(.dat) or text file (.txt) for reading and writing an address. Assume that the size of id, name,<br>street, city, gender, and zip is 4, 32, 32, 20, 1, 5 characters, respectively.<br>• Program should perform add, first, next, previous, last, updateByld, SearchById,<br>CleanTextFields operations.<br>• ID text field should be “read only

Extracted text: 1- Write a java program that stores, retrieves, adds, updates and search addresses as shown in figure. Use a fixed-length string for storing each attribute in the address. Use random access file(.dat) or text file (.txt) for reading and writing an address. Assume that the size of id, name, street, city, gender, and zip is 4, 32, 32, 20, 1, 5 characters, respectively. • Program should perform add, first, next, previous, last, updateByld, SearchById, CleanTextFields operations. • ID text field should be “read only" and id should be set in the code for each record, do not take from user. • Use Search/Update ID text Field as input for UpdateByld and SearchByld buttons. • Create Person class. Data fields are: ID, name, street, city, zip, gender. Create constructor, getters and setters. • When program starts, read all records from random access file or text file and save each record in Person []. (Person array) • Update both Person[] and random access file or text file when add and update operations happen. • Use Person[] for first, next, previous, last, searchById operations, do not use random access file. • Create Alert when new record added successfully. You may add some controls (like: alert) in situations like: pressing "next" button when viewing last record, pressing “previous" button when viewing first record.

Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here