Starting from:

$25

Lost and Found - Pet recovery system

This assignment requires you to create a complete Java program consisting of 5 source code files and two JUnit test case files. You must electronically submit your source files by the due date. Directions for using submit are at the end of this page. Requirements Companion Animal Recovery is a non-profit affiliate of the American Kennel Club with a mission of recovering lost pets. CAR is located in Raleigh, but it services pet owners from all over the world. CAR has a database of information on more than 2.5 million owners and their pets. Each pet enrolled in the database has a collar tag, tattoo, or microchip for identification. Since microchips are permanent (they do not tear off and they do not fade), CAR encourages pet owners to microchip their pets and enroll them in their database. If an animal shelter or vet scans a lost pet and calls CAR with the microchip string, CAR will contact the owner. Microchip strings are unique (no two are the same). You must write a program that is a simple prototype of CAR's database management software to illustrate the pet registration and recovery process. Program functionality We have created a graphical user interface (the view) for your program, which is shown here. The GUI window has several components: Text fields, combo box, and a button adding a pet record to the database. The user must enter the phone number and name of the owner and the kind of pet. Both the number and name are simply text, though the convention is to add the name in the form , . If the desired kind is not on the dropdown list (combo box), the user can type the kind in the list before adding. Text field, radio buttons, and button for searching for all pets matching a particular criteria. The user must enter a search string and select which field to search in (chip, owner, or phone). When the user clicks Search, the Registered Pets list displays all pet records in which the string entered is the prefix for the value of the selected field. If the string entered is blank, then all records are shown. A button for removing a pet record. The user must select the pet from the Registered Pet list then click the button to remove. A quit button. When the user clicks this button, the pet record data is written to a text file and the program quits execution. Displaying the registered pets data The Registered Pet list is shown when the program begins execution and whenever any button except Quit is clicked. The list displays all of the fields for each pet record in the database. The fields are aligned neatly in columns. The pet records are in alphabetic order according to owner name. The ordering is case insensitive. A single pet record contains the following information: Chip. A string of maximum length 10. Chips are in the first column. Phone. A string in the standard phone number form (xxx)yyy-zzzz. Owner name. Any string. Pet kind. A string of maximum length 8. The following picture is a snapshot of the program after the user searched for all records where the chip begins with 111. Getting initial data and saving final data When your program starts execution, it must attempt to read the data for the database from a text file. Each line of the text file corresponds to a registration record, where the individual pieces of data for the record are separated by tab characters. The next time you want to run the program with the same input file, select Run from the main menu. You can execute your program from the command line using the petdata.txt file as input. First move petdata.txt to your project directory and change to that directory. Then use this command: % java csc216project1.RecoveryGUI petdata.txt Of course, you can create and enter other files on the command line for testing purposes. Deployment You must submit the Java source code files that you created for the backend and their JUnit test files: Pet.java PetTest.java PetData.java PetDataTest.java

More products