Artifact 2: Algorithms and Data Structures

Original Artifact: Grazio Rescue Animal Service

For this second artifact, the original project was from an early course I was attending at SNHU: IT-145 Foundations in Computer Programming. The purpose of the project was to create an command line application in Java that could be used to input rescue animals into an array list. It consisted of three data classes:

This project was an excersice in learning inheritance and object manipulation.

View Project on GitHub

Narrative Describing Artifact and Planned Enhancements

1. Briefly describe the artifact. What is it? When was it created?

For category 2 I chose the Final Project from IT-145. The project was for a Rescue Animal Service that developed a Java program to manage different rescue animals for a made up customer. It consisted of 4 files and was mainly focused on inheritance. The project had a Parent Rescue Animal class and two child classes, Dog and Monkey. It also had a driver class for managing the lists of Rescue Animals, and stored them in separate arrays. To access these lists the program would iterate through the entire list to find the specific animal the customer needed to look for.

2. Justify the inclusion of the artifact in your ePortfolio.

I chose this project to include in my portfolio to show off how much I have grown over the year or so since I developed the initial project. The initial project was focused on data access through getters and setters, saving the data into arrays and linear retrieval. I decided it would benefit from the implementation of a Binary Search Tree data structure that would speed up retrieval times. I also decided to port the program to C++ instead of Java, but this was mainly so I did not have two Java applications as part of the portfolio.

3. Did you meet the course outcomes?

With this enhancement I feel that I met the course outcome of:

4. Reflect on the process of enhancing and modifying the artifact.

For this enhancement I chose to change the project from Java to C++. One major issue I ran into was that I thought I remembered C++ a lot more than I truly remembered. It took me a few hours to stop staring at the screen and remember the syntax and procedures of pointers for this enhancement. Eventually after much rereading of some of my books, web articles and my previous ZyBooks I was able to remember what I needed to do to implement a Binary Search Tree and how to manage class definitions, iostream and the other specifics of C++ I had forgotten, even though I developed a program in C++ just 6 months ago. I also ran into issues with Visual Studio’s auto complete function. It kept suggesting code that was not what I wanted and there were a few times that I pressed tab accidentally and added a lot of code that I did not want. Eventually I shut off the autocomplete “Assistance” and just focused on developing without it.

View Project on GitHub

Description of the Enhanced Artifact

1. RescueAnimal Struct:

2. Dog Struct:

3. Monkey Struct:

4. Node Struct:

5. BinarySearchTree Class:

6. RescueAnimalService Class:

7. main() Function:

Screenshots of Enhanced artifact

User Interface with inputing new dog

The User interface is a basic command line interface. When a new animal is entered into the system it is inserted into the binary search tree.

Rescue Animal Data Structure

RescueAnimal Data Structure

Dog Data Structure

Dog Data Structure, child of RescueAnimal Structure

Monkey Data Structure

Monkey Data Structure, child of RescueAnimal Structure

Node Data Structure

Node Data Structure

BST search vs Linear search

Comparison of time taken to find record using BST search vs Linear search.