Starting from:
$35

$29

Project 1 Solution


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.

    1. GetName function which returns a string.

    2. GetType function which returns a string.

    3. GetWeight function which returns an unsigned integer.

    4. GetPrice function which returns a double.

    5. 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.
Coding Requirements:

    1. You should have correct abstraction of classes that separates data and algorithms.

    2. Draw a UML diagram.

    3. 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.

    4. Implement your code such that it follows proper privacy and give clients only the interfaces they need. Clients should not access data members directly.

    5. Your program should not have memory leaks.

    6. Provide Get and Set functions for all necessary data members.

    7. 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.
    8. 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:

    1. Work in teams of two to design the UML and implement the project.

    2. 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.
    3. 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.

    4. Each team must submit a UML along with the project code and team meeting reports.

    5. You must submit a zip file that contain UML, team participation report and one directory:

        (a) A UML diagram (PDF document) including:

            i. NetID of each group member,
            ii. Full name of each group member

        (b) Each team submits TWO meeting reports in their project submission.

        (c) 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.

    6. This project is due via Handin (https://secure.cse.msu.edu/handin/) 
Project Output:

More products