Find Jobs
Hire Freelancers

File Handling in Java

$30-100 USD

Closed
Posted almost 18 years ago

$30-100 USD

Paid on delivery
Write a program, which imitates a simple organizer. This organizer will be used to create, keep, view and delete names, phone numbers and birthdates of your friends. The information must be stored in the file “[login to view URL]”. Task A Create a design for your program from the following specifications: • class Person which contains the fields for name, surname, phone number, date of birth. Also the class must contain a non-static method “public int compareTo(Person p)” that compares lexicographically full names of the current person object you called the method on and the person p which is passed as a parameter to the method. It should return +1, 0, or –1 depending on whether the current person’s name comes earlier, is the same or comes later in the lexicographical order as that of the parameter p. • class Date, objects of which represent dates. It must contain three integer fields for day, month, and year. Also the class must contain a non-static method “public int compareTo(Date d)” that compares the date represented by the current date object you called the method on with the date represented by the parameter passed to the method. It should return +1, 0, or –1 depending on whether the current date is earlier, is the same or is later then the date represented by the parameter p. Both classes must implement Serializable interface. The compareTo methods are used for sorting. Task B Create a class Organizer (extends JFrame), which opens the file “[login to view URL]” (if the file does not exist program must create it) and outputs information stored in the file in the following Organizer: All Person objects stored in the file “[login to view URL]” are displayed in JList with scrollbar. When you choose some element from the JList, information about corresponding person displays in the form. You can sort persons either by Full Name (lexicographically) or by Date of Birth clicking appropriate radio buttons. You also can delete several items from the JList by clicking the Delete button. You can undo the last delete by clicking the Undo button. If you close the form (by clicking either the Close button or x button), current information will be written to “[login to view URL]” file. To input information about a person you must click the “Create Entry” button in the Organizer. In this case the following modal JDialog “Input Form” appears on the screen (class InputDialog extending JDialog). You can fill the text fields of the form with the information of the person. If everything is correct click Write, otherwise click Cancel. In both cases all text fields become clear, but in the first case information is stored, in the second is discarded. Clicking the Close button or x-button of the “Input Form” makes the dialog invisible, and all the changes made are displayed in the “View Form”. Note:- GUI images for the project attached in a word document. Just have a look. This program must be done in Eclipse.
Project ID: 65784

About the project

19 proposals
Remote project
Active 17 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs

About the client

Flag of INDIA
Ahmedabad, India
5.0
2
Member since Jun 6, 2006

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.