Enrolling and withdrawing from camp faster

Assignment Help Basic Computer Science
Reference no: EM13934468

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 s hould 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. Be sure to echo the input, especially for commands that give no output (like E or W), and handle special cases in a clean way (for example, computing the average age of an empty tree should not crash your program)

Reference no: EM13934468

Questions Cloud

Advantages and disadvantages of business regulations : Research, identify and discuss the advantages and disadvantages of business regulations
Java source code listing : Java class files for all parts and a short report (word document) the report should include details of: 1.Input 2.output 3.Problem analysis and Algorithm design 4.Variables 5. Formatting the output 6. Main Algorithm 7. Java source code Listing 8...
Assuming positive interest rates-holding other constant : Which of the following statements is CORRECT, assuming positive interest rates and holding other things constant?
Industrial firms paying dividends has increased : Which of the following are factors that help explain why the percentage of U.S. industrial firms paying dividends has increased since the early 2000s?
Enrolling and withdrawing from camp faster : 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 ..
Major depression in the population : What would you ask the community health workers in order to identify if maternal depression may be an important factor in this scenario?
Describe myoglobin structure : Define the following: prosthetic group, fractional saturation, allosterism, cooperativity, Bohr effect, isohydric carriage, respiratory acidosis & alkalosis, metabolic acidosis & alkalosis. Please provide examples.
Find the value of a small general-use building : Using the cost approach, find the value of a small general-use building with the following characteristics.
Describe what the company has done to address the issue : Describe what the company has done to address the issue and describe the leadership's role in this issue - Briefly describe one of the major strategic issues that Starbucks currently faces.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

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