Description
Project Description:
Front-end developer John is creating a website for Reed’s Pet Shop, but he needs back-end support to maintain and manipulate the collected data. John’s website will work with a database of your design. During last Monday’s meeting, both of you agreed on a set of Application Programming Interfaces (API) that is exposed from the Pet Database, so that he can work on his website while you are working on the database simultaneously.
Reed’s Pet Shop sells dogs, cats, fish and birds. Each Pet has attributes name, type, weight and price. For dogs, a breed category characteristic determines whether the dog is a hound, herding, sporting, companion, etc. (string). For birds, the customer is provided with nocturnality, whether the bird is active at night (Boolean). For fish, the customer needs to know whether the fish is freshwater fish, saltwater fish, or it can thrive in any environment (string). For cats, the customer would like to know whether the cat is fluffy (Boolean).
Part of John’s website is an online ordering system. Therefore, you need to implement databases that allow users to access pet information sorted by name, type, weight, and price, alphabetically or numerically depending on the type of the attribute. Furthermore, the sorting can be done in both ascending and descending order. You also need to implement databases searchable by pet’s name, type, weight and price. In total you will need 8 databases, of which 4 will be searchable databases and 4 will be sortable databases.
John also needs the following access to get basic information about each pet.
-
GetName function which returns a string.
-
GetType function which returns a string.
-
GetWeight function which returns an unsigned integer.
-
GetPrice function which returns a double.
-
Print function that outputs basic pet information and special attributes.
The project implementation asks you to apply your knowledge about the Abstract Factory Pattern and the Template Method Pattern. Your code should sort the database using the Bubble Sort algorithm incorporating the Template Method Pattern. Your code should search using the Binary Search algorithm. Note that the Binary Search algorithm requires that the input is sorted in ascending order.
-
You should have correct abstraction of classes that separates data and algorithms.
-
Draw a UML diagram.
-
You cannot change the main.cpp file provided to you. Your program MUST compile and run with the main.cpp. Your output should match the sample output. Your output should be properly indented as shown in the sample output.
-
Implement your code such that it follows proper privacy and give clients only the interfaces they need. Clients should not access data members directly.
-
Your program should not have memory leaks.
-
Provide Get and Set functions for all necessary data members.
-
For all member function that do not change values of member variable should be constant. For all calls by reference, if it does not make changes to the variable passed by reference then they should refer to const.
-
Each class should be either defined and implemented in one header file or defined in a header file and implement in a cpp file. No two classes should be defined or implemented in one file.
Submission Guidelines:
-
Work in teams of two to design the UML and implement the project.
-
You must have received an email about your team member. You are not allowed to change teammate. If you have issues or concerns about your project team, email TA Salman Ali at alisalm1@msu.edu ASAP.
-
Each team must meet at least TWO times. For each meeting, you need to fill a Team Meeting Report in detail. If your teammate does not respond or participate in your project meeting, then you need to include email proof along with your submission.
-
Each team must submit a UML along with the project code and team meeting reports.
-
You must submit a zip file that contain UML, team participation report and one directory:
-
-
A UML diagram (PDF document) including:
-
-
-
-
NetID of each group member,
-
Full name of each group member
-
-
-
-
Each team submits TWO meeting reports in their project submission.
-
-
-
The whole Netbeans project directory. You need to ensure that NetBeans can open your project, compile and run. Your project will not be graded if it does not compile.
-
-
This project is due via Handin (https://secure.cse.msu.edu/handin/)