logo Hurry, Grab up to 30% discount on the entire course
Order Now logo

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Connor EvansData mining
(5/5)

802 Answers

Hire Me
expert
Ata WhbaLaw
(5/5)

755 Answers

Hire Me
expert
Nathan OlivieriMathematics
(5/5)

712 Answers

Hire Me
expert
Stevan DuignanMathematics
(4/5)

526 Answers

Hire Me
C++ Programming

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.

Related Questions

. The fundamental operations of create, read, update, and delete (CRUD) in either Python or Java

CS 340 Milestone One Guidelines and Rubric  Overview: For this assignment, you will implement the fundamental operations of create, read, update,

. 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

Retail Transaction Programming Project  Project Requirements:  Develop a program to emulate a purchase transaction at a retail store. This

. The following program contains five errors. Identify the errors and fix them

7COM1028   Secure Systems Programming   Referral Coursework: Secure

. Accepts the following from a user: Item Name Item Quantity Item Price Allows the user to create a file to store the sales receipt contents

Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip

. The final project will encompass developing a web service using a software stack and implementing an industry-standard interface. Regardless of whether you choose to pursue application development goals as a pure developer or as a software engineer

CS 340 Final Project Guidelines and Rubric  Overview The final project will encompass developing a web service using a software stack and impleme