Find Jobs
Hire Freelancers

File Handling in Java

$30-100 USD

Închis
Data postării: aproape 18 ani în urmă

$30-100 USD

Plata la predare
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.
ID-ul proiectului: 65784

Despre proiect

19 propuneri
Proiect la distanță
Activ: 17 ani în urmă

Vrei să câștigi bani?

Avantajele de a licita pe platforma Freelancer

Stabilește bugetul și intervalul temporal
Îți primești plata pentru serviciile prestate
Evidențiază-ți propunerea
Te înregistrezi și licitezi gratuit pentru proiecte

Despre client

Steagul INDIA
Ahmedabad, India
5,0
2
Membru din iun. 6, 2006

Verificarea clientului

Mulțumim! Ți-am trimis prin e-mail linkul pe care trebuie să-l accesezi pentru a revendica creditul gratuit.
A apărut o eroare la trimiterea e-mailului. Încearcă din nou.
Utilizatori înregistrați Totalul proiectelor postate
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Se încarcă previzualizarea
S-a oferit permisiunea de depistare a locației.
Ți-a expirat sesiunea pentru conectare sau te-ai deconectat. Conectează-te din nou.