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

  Discuss the backend methods for providing logins

1. Discuss the backend methods for providing logins on a network service running on a Linux/UNIX server.

  Expalin programs like ping and some of scanning tools

When using programs such as ping and some of the scanning tools to do forensic investigations, we may easily tip off the suspect that is under investigation

  How is file management utilized and managed

How is file management utilized and managed? What tools can you use? For those of you who work, how is file management managed in your place of business?"

  Intro internet communication and development

From the Internet Detective, what factors should you consider when evaluating a web-based source for academic research?What characterizes the stage of internet development following Web 2.0?

  Shows four technological developments

Create a timeline that shows four technological developments that have had an impact on the way that people seek out marriage or life partners. The timeline should cover the period between 1900 and the present.

  F denotes false and t denotes true

F denotes false and T denotes True

  Data-hiding techniques

1. Explain how a user could utilize ADS to hide data and explain other destructive uses which exist for ADS.2. Determine how rootkits can be used as an alternative for data hiding and explicate why they can be used for this purpose. 3. Describe the p..

  Evaluate an organizations strategic business units

Discuss the concept of perceived value and its importance to consumer behaviour and marketing. Discuss the theory and then give practical examples of how customers perceive various brands and how this impacts on their behaviour.

  Publishes the private keys of all entities

We must assume that Trudy can do all of these except A) attempt to impersonate either Bob or Alice B) hijack or take over a connection between Bob and Alice C) evesdrop or intercept messages between Bob and Alice D) know Bob or Alice's private key 2...

  Plans to update the website using css

Karina, just having completed a Web design course, was tasked by her project manager with updating the website for a nursing facility. Karina noticed that the website navigation bar was built in a table, which is not the preferred use of the t..

  Intentional and unintentional plagiarism

What is the difference between intentional and unintentional plagiarism

  Create an html5 document that contains an unordered list

Create an HTML5 document that contains an unordered list with links to the following examples headings, email, images as hyperlink these are from textbook, special characters, tables, HTML5 forms, and internal links to be included.

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