Question
Write in JAVA code programwhich consist of two parts: the back end classes and structures that keep and manage the animal clinic's data and the
Write in JAVA code programwhich consist of two parts: the back end classes and structures that keep and manage the animal clinic's data and the front end JavaFX base GUI that provides access to the data.
Back End Requirements Three types of information must be kept by the back end: customer information; dog information; and transaction information, and account information.
Customer information will include the following: -customer ID -last name - first name -address (street, apartment, etc) -city/town -state -zipcode -home phone -mobile phone -email address
-dog ID list (contains the dog ID for each dog owned by the customer)
The dog information will include: -dog ID -dog name - owner (owner's customer ID) -breed -color -age - gender
The transaction information will include information about having a dog stay at at the kennel -dog ID - arrival data - departure date
- service level (1, 2, or 3) -rate per day ($89, $129, or $149) -total charge -deposit (15% of total charge)
Account information will include the following items: -user name for admin -password for admin
Each of the these will be represented by a class. Each class should make its data variable private. It should provide at least one constructor that can build an object that holds all of the indicated data. Each class should have getter and setter methods for all of its private data. Also include a public toString() method that includes - for the customers name and mobile phone -for the dog, the name, gender, breed, and age. - for the stay info, the dog ID, start and departure dates - for the account info, the customer ID, the user name, and the dog IDs The classes should implement the Comparable<> interface: - for customer records order by last name, first name, ID - for dogs, order by dog name, ID - for transactions, order by start data - for account info, order by customer ID
Each of the classes should implement a public equals() method that returns true or false: for customer records, equals() returns true if the customer ID of the calling object matches the customer ID of the parameter object for dog records, equals() returns true if the dog ID of the calling object matches the dog ID of the parameter object for transaction records, equals() returns true if the dog ID and start date of the calling object match the dog ID and start date of the parameter object for account records, equals() eturns true if the user name of the calling object matches the user name of the parameter object.
Adding data to your application write a private method that will initialize your application to contain: - at least five customer records with each customer having at least one dog; - at least five dog records, - at least five transaction records, and - one account record for the administrator.
must have this method so that we can run your application and see how it behaves and displays data.
Front End GUI Your front end must be a hand-coded JavaFX application. Your front end should have a number of screens which are used for for interacting with the system. These screens may be implemented as
JavaFX Scene classes. Should use only those controls that are part of the standard JavaFX tools, basically those that are discussed. Application must have a sign on screen that takes a user name and password and uses it to find a user account. The application will then switch to a screen containing options for the administrator. (discussed later). Application must have an option screen with that provides a way to perform the following functions. You will switch to other screens to perform the functions. You may provide text fields if the function requires information (customer name, dog name, etc). Each of the other screens should have a way to return to this screen. 1. sign off - goes back to the sign on screen 2. show customers - produces a (sorted) list of customers 3.show dogs - produces a (sorted) list of dogs
4.show transactions - produces a (sorted) list of transactions
5. add customer - add a new customer (and dog) 6.remove customer - remove a customer (and all dogs)
Suggestions Use Java ArrayLists to hold your data records. You should define your ArrayLists in the class section and not in the start() method variables in order to make them accessible to your front end event handling code. Make your classes for the customer, dog, transaction, and account classes implement the Comparable<> interface so that they can be used with the sort() methods available for ArrayLists and and the equals() method so that they can be used with the contains() methods that allows searching by object. If you get the error that has the phrase "final or effectively final," this may mean that a local variable of start() should be moved to become a class level variable. The method that initializes your data should be called before your call s.show()
Submit the code in JAVA
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Heres a Java implementation for the back end classes as well as the front end JavaFX GUI based on the provided requirements java import javautilArrayList import javautilCollections import javautilDate ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started