Maintain the set of campers enrolled in camp posanivee

Assignment Help Data Structure & Algorithms
Reference no: EM13678812

The director of Camp Posanivee is frustrated. Campers are enrolling and withdrawing from camp faster than her primitive filing system can handle, and she has turned to you. You have been offered free meals at the mess hall in return for a program that will help her keep track of who is enrolled for the two-week summer camp.

Your program will use a binary search tree to maintain the set of campers enrolled in Camp Posanivee. Your program should not be case-sensitive.

Your program will consist of a loop to process commands. The commands should come from a text file (say, "camp.txt"). The program quits when the command 'Q' is given. Below is a list of commands your program should support:

H Help: print a list of commands

E name age gender Enroll a new camper (insert)

W name Withdraw a camper (delete)

D name Display the age and gender of a camper

A Print the average age of the campers

L List all campers names in alphabetical order

S Print the number of boy and girl campers

P List all campers names in preorder

Q Quit

Here name is a string of at most 20 non-blank characters, age is an integer, and gender is either M or F. You may assume command arguments are separated by one or more spaces.

Reference no: EM13678812

Questions Cloud

Compute the maximum rise of temperature in the air : A 10-kg mass traveling at 40 m/s strikes a plunger attached to a piston. The piston compresses 0.2 kg of air contained in a cylinder. If the mass is brought to rest, compute the maximum rise of temperature in the air.
Three narrow concentric rings of radius : Three narrow concentric rings of radius 50 mm, 70 mm and 90 mm are centered at the origin, with the axis of symmetry oriented along the y-axis. The total charge on the inner ring is 1.0 mC, that on the middle ring is -2.0 mC and the charge on the out..
Make a histogram of the data using a bar width : Make a histogram of the data using a bar width
Net electric field produced with particles at squares center : In the figure the four particles form a square of edge length a = 7.40 cm and have charges q1 = 9.32 nC, q2 = -21.0 nC, q3 = 21.0 nC, and q4 = -9.32 nC. What is the magnitude of the net electric field produced with the particles at the square's cente..
Maintain the set of campers enrolled in camp posanivee : Campers are enrolling and withdrawing from camp faster than her primitive filing system can handle, and she has turned to you. You have been offered free meals at the mess hall in return for a program that will help her keep track of who is enroll..
Economic implications of such location bidding wars : Economic implications of such location bidding wars?
Determine how it uses aggregate planning. : Example of service provider and determine how it uses aggregate planning.
Show both the sheduling and gantt load charts : Show both the sheduling and Gantt load charts.
Kate scored in the 10th percentile rank on an exam : Kate scored in the 10th percentile rank on an exam

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Creating application - two dimensional array

Make an application that either sums or averages rows or columns of a 2-dimensional array depending on user choices.

  The development of complex algorithms that can mine mounds

the development of complex algorithms that can mine mounds of data that have been collected from people and digital

  Question about lan and wan

Think about the following two scenarios two computers are connected to a LAN using a total of 20-feet of cable, and two computers are connected over the Internet and are 8000 miles from each other.

  Saving contents of the richtextbox by creating a program

Create the statements to save the contents of the RichTextBox named rtbCurrent. Show a SaveFileDialog named sfdCurrent to get the name of the document from the user.

  Empty stack

1. Suppose an initially empty stack S has performed a total of 25 push operations, 12 top operations, and 10 pop operations, 3 of which generated EmptyStackExceptions, which were caught and ignored. What is the current size of S?

  Use big-o notation to categorize algorithms

Use big-O notation to categorize traditional grade school algorithms for addition and multiplication. That is, if asked to add two numbers each having N digits, determine individual additions should be performed?

  Algorithm to compute-report grade-point average for class

Compute and report grade-point average for class. Determine the sum of the grades; count number of students; compute average. Determine its algorithm?

  Testing item in array of member using sequential search

Look up each test item in array of member items, by using sequential search. What is the worst-case running time of it. (asymptotically, in terms of n and k)?

  Draw the recursive process of mergesort and quicksort

Draw the recursive process of Mergesort and Quicksort for sorting the sequence {5, 1, 2, 9, 7}. You will get a recursion tree for Mergesort and Quicksort respectively. What are their depths?

  Creating an idef1x diagram

Construct an IDEF1X diagram that demonstrate only entities and relationships. Name each relationship and specify its cardinalities.

  Create an application to implement apriori algorithm

Create an application to implement Apriori Algorithm and demonstrate the two main phases in it, which are i) Generation of frequent itemsets; ii) Generation of association rules.

  Design algorithm to solve spectral assembly problem

Design an algorithm to solve the Spectral Assembly problem under the above conditions. Does the problem have a unique solution?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd