Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I only need help with TheZoo.cpp all this other java stuff is done (ZooFileWriter.java): the beginning of TheZoo.cpp doesnt need any work either: i dont

I only need help with TheZoo.cpp
image text in transcribed all this other java stuff is done (ZooFileWriter.java):
image text in transcribed
image text in transcribed
the beginning of TheZoo.cpp doesnt need any work either:
image text in transcribed
image text in transcribed
i dont need help with Animal.cpp/h, or the ones for bat, crocodile, goose, mammal, oviparous, pelican, sealion, whale...
here are the directions:
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
OS gistics Service Intelligence TheZoo - Notepad File Edit Format View Help void AddAnimal() { TODO: Write proper code to add an animal to your vector (or array) void RemoveAnimal) TODO: Write proper code to remove an animal from your vector (or array. Rember to re-allocate proper size if using array void LoadDataFromFile() TODO: Write proper code to load data from input file (generated using JNI) Into vector/array. void SaveDataToFile() /* TODO: Write proper code to store vector/array to file. */ > void DisplayMenu() 1000 writo proper code to display menu to user to select from ZoofileWrit... TheZoo.cpp 1 import java.io.Filewriter: Animal.cpp Animal.h Bat.cpp & Bath Crocodile.cpp Crocodileh 16 Go 5 6 public class ZoofileWriter 7 93 public static String padleft(String str, int leng, String stringpadval) 10 for (int i - str.length(); i maybe wae aetan, et 3 binolude // Java 4 include cvectors // une to store and grow dynamically begin/en/size/ere of vector 5 include GetVersion (): 41 cout > 16) & Ox) <. oxo endl class els2 env->FindClass("200Filekriter): 47 if (cls2 = nullptr) I try to find the class 18 cert GetStaticMethodID (else, "createZoofile".0) 1 Find method 53 1 (mid-nilptr) cert Teme-nate rota olse 1 (auType -- ) Good new Goose legge -> Cracket traceum CODE Wildlife Zoo CS 210 Wildlife Zoo Interface Guide Functional Requirements You will write a multi-class C++ interfacing prototype system for the Wildlife Zoo that incorporates Ja for certain functionalities. The functional requirements for all components of the interface are as follows. . 1. A user menu which displays the following options: Load Animal Data . Generate Data Display Animal Data Add Record Delete Record Save Animal Data . . . . 2. Generate Data: Your supervisor has created this code for you in Java. In the C++ class you have been given, the createZooFile) function has been created for you. You should not modify the Java code. a. For this function, you should make sure the user menu calls the createZooFile() function when the user selects "Generate Data" from the menu. b. You will need to call this function and generate a file. When you are prompted for input, remember the following character limits: 1. Track #: 6 characters Name: 15 characters iil Type: 15 characters iv. Sub-type: 15 characters Eggs: Integer vi. Nurse: Integer V. . 3. Load Animal Data: a. In your zipped folders, you have been given a lava class that generates a fixed length file. It will prompt the user to enter data for the following fields: Track #: Received from the RFID chip technology Name: Name given to the animal Type: Oviparous (egg laying) or Mammal (primarily non-egg laying) Sub-type: Crocodile, Bat, Whale, and so on Eggs Number of eggs laid Nurse Should read of the animal is not nursing, 1 if it is b Data in the file will look like this. Column widths in the actual file will be fixed and are respectively characters, 15 characters. 15 characters, 15 characters, and two integer columns Wildlife 200 Nurse 0 Eggs 2 0 0 0 1 0 1 0 Track # 000001 000002 000003 000004 000005 000006 000007 000008 000009 000010 000011 Name Tick-Tock Fidget Willy Bailey Goose Lee Honker Becky Nigel Fluke Rudder Bartok Type Oviparous Mammal Mammal Mammal Oviparous Oviparous Oviparous Oviparous Mammal Mammal Mammal Sub-type Crocodile Bat Whale Whale Goose Goose Pelican Pelican Sealion Sealion Bat 1 1 0 0 0 0 0 0 0 0 0 1 1 c. You must give users the ability to load this data into memory via a vector within your system. Use the following UML class diagram to build your class hierarchy and inheritance. Notice the variables listed in the Animal, Oviparous, and Mammal classes. A text version is available on the last page of this document. Animal are string Tradum: Integer Oviparous Mammal Numberostar Nurse focodile Goose Pelican Bat Whale Sealion d. The message "Load complete will display after the data loads successfully 4 Display Animal Data: Display data on the user's computer screen in tabular format (presented in the form of a table with rows und calamos Wildlife Zoo dd Record: Provide the capability to add new animal records. a. When this menu option is selected, the application should prompt the user to enter values for the variables "Track#," "Name," "Type," "Sub-type," "Eggs," and "Nurse." 1. Make sure to validate input. b. The user should have the ability to save or cancel the addition, Delete Record: Provide the capability to delete animal records. a. Delete an animal record by "Track#" when the user selects the "Delete Record" option from the menu. Make sure to validate input. b. The user should be prompted to confirm the deletion before the record is removed from the system C. The message "Animal successfully deleted" should display once the operation finishes. Save Data: Permit the user to save modified animal data back to the input file, erasing the data that was previously there. The message "Save successfully completed" should display once finished, 919 100% + Wildlife Zoo UML Class Diagram Text Version In this text version, each class is created as a table with the class name as a header. There are arrows demonstrating inheritance connecting the different tables, each with alt-text descriptions. The UML class diagram displays a total of nine classes. The abstract class is Animal, which has two variables: a String variable called "name" and an Integer called "code". Inheriting from that class are two classes: Oviparous, which has a variable +NumberofEggs, and Mammal, which has a variable +Nurse. There are three classes which inherit from Oviparous: Crocodile, Goose, and Pelican. There are three classes which inherit from Mammal: Bat, Whale, and Sealion. Animal name: String code: Integer (no methods listed) Oviparous NumberofEggs Mammal +Nurse Crocodile Goose Pelican Bat Whale Sealion

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Master The Art Of Data Storytelling With Visualizations

Authors: Alexander N Donovan

1st Edition

B0CNMD9QRD, 979-8867864248

More Books

Students also viewed these Databases questions

Question

=+Is the sex appropriate for the audience?

Answered: 1 week ago

Question

2. Identify conflict triggers in yourself and others

Answered: 1 week ago