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

  Project that will implement a new course registration system

Pretend that you are leading a project that will implement a new course registration system for your college. You are thinking about purchasing packaged course registration software or outsourcing the job to an external consultant. Using MS word, cre..

  Discuss the statement -in the near future

Discuss the statement "In the near future, Web application development will be dominated by Web Services.

  Write a method named longestsortedsequence

Write a method named longestSortedSequence that accepts an array of integers as a parameter and that returns the length of the longest sorted (nondecreasing) sequence of integers in the array.

  Solution to demonstrate the operation of hoare

Solution to Demonstrate the operation of HOARE-PARTITION on the array A D h13; 19; 9; 5; 12; 8; 7; 4; 11; 2; 6; 21i, showing the values of the array and auxiliary values after each iteration of the while loop in lines 4-13.

  Evaluate student ability to research and evaluate security

Evaluate the student  ability to research and evaluate security testing software and present a proposal for review by executive team members

  What is the frequency of the ripple voltage

What is the frequency of the ripple voltage for a negative output half-wave rectifier with an input of 120 Vrms, 60 Hz?

  Explain the steps take to stop cyber squatter explain the

explain the steps take to stop cyber squatteryou are a owner of the register trademark and you just found that domain

  Virtual written report and powerpoint presentation

This assignment contains two (2) sections: Written Report and PowerPoint Presentation. You must submit both sections as separate files for the completion of this assignment. Label each file name according to the section of the assignment it is wri..

  Versions of microsoft word

How is this version of Microsoft Word different from earlier versions of Microsoft Word? Be sure to include research AND your opinion.

  Explains how to create a table in microsoft word

explains how to create a table in Microsoft Word (whatever version you have) and how to add and delete columns and rows from an existing table.

  Calculate the average cpi for each machine

Calculate the average CPI for each machine, M1, and M2 and calculate the average MIPS ratings for each machine, M1 and M2.

  Explain performance which is boost by new version of chip

Let the following hypothetical news release: "Company will unveil industry's first 5 GHz version of chip, which presents 25% performance boost over company's former speed champ. Explain the definition (or definitions) of performance.

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