Earn Higher Grades With Instant Assignment Help.Ask Question!

C++ Programming
(5/5)

For this exercise, you are only required to implement the tree balancing for insert operations

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

Associative Arrays: Red Black Trees

Overview

In the last PEX8, you restructured the implementation of your parts database using a binary search tree.  However, the performance hasn’t gotten any better.  After much wailing and gnashing of teeth, you have observed the data entry folks adding parts to the database.  Whenever parts are added, they are added in alphabetical order.  DOH!  Your BST isn’t any better than your list implementation.

You have decided to change your BST implementation into a red black tree.  This ensures that during the database creation process your tree remains roughly balanced.  Hopefully this will result in a much better search time when the database is queried in the future.

Parts Catalog Architecture

The parts catalog is an associative array of associative arrays.  The outermost array is keyed by part name, (a string in this case).  The content of the outer associative array is the inner associative array.  The inner associative array is keyed by a parameter name and the content is the parameter value, (both strings).

When iterating through the structure it should be possible to print all part names in order and then print each parameter and associated value for that part in order of parameter name.  It should also be possible to extract any given parameter value by using the get methods.

For this exercise, you are only required to implement the tree balancing for insert operations, (i.e. your tree does not need to support delete operations at all).  However, if you choose to build delete operations for your red black tree, you will be awarded extra credit.

Programming Concepts

This exercise covers many programming concepts including red black trees, inheritance, deep copy, constructor types including default and delete, operator overloading, pass by ref and by val, return by ref, stack vs heap, binary search trees, templates, reference counting pointers, lambdas, closures, functors, and abstract base classes.

System Requirements

The design must use the provided interface header verbatim.  This will allow automated testing of the design you produce.  See grading rubric for specific system requirements and associated grade values.

Attachments:
(5/5)

Related Questions

CSI 1420 Introduction to C Programming & Unix Fall 2018, CRN 44882, Oakland University Homework Assignment 6 - Using Arrays and Functions in C

DescriptionIn this final assignment, the students will demonstrate their ability to apply two majorconstructs of the C programming language – Fu

The standard path finding involves finding the (shortest) path from an origin to a destination, typically on a map. This is an

Path finding involves finding a path from A to B. Typically we want the path to have certain properties,such as being the shortest or to avoid going t

Develop a program to emulate a purchase transaction at a retail store. This program will have two classes, a LineItem class and a Transaction class. The LineItem class will represent an individual

Develop a program to emulate a purchase transaction at a retail store. Thisprogram will have two classes, a LineItem class and a Transaction class. Th

SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 1 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

Ask This Assignment To Be Done By Our ExpertsGet A+ Grade Solution Guaranteed

expert
joyComputer science
(4/5)
12 Answers Hire Me
expert
Robert DLaw
(4.8/5)
571 Answers Hire Me
expert
Dr Samuel BarberaStatistics
(5/5)
657 Answers Hire Me
expert
Tutor For YouEconomics
(5/5)
730 Answers Hire Me