Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

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)

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M91605354

Have any Question?


Related Questions in Computer Engineering

Sorted golf scores - need flowchartdesign a program that

Sorted Golf Scores - need flowchart Design a program that asks the user to enter 10 golf scores. The scores should be stored in an Integer array. Sort the array in ascending order and display its contents. Looking for "" ...

Up and down a stringcreate a program called

Up and Down a string Create a program called lastnomeupAndDown take a string input from the user and print out that will substrings of increasing length next to each other until the word is fully printed, then repeat the ...

Create login form to enter user name and a password textbox

Create login form to enter user name and a password textbox to enter password, and write procedure to simulate the process of triggering the login process after hitting the Enter Key.

What is the concentration of total nitrogen in 15 mg nh3l 3

What is the concentration of total nitrogen in 15 mg NH3/L, 3 mg NO2-/L and 13 mg NO3-/L in mg/L, moles/L, ppm and ppb?

Smartphones have become an important part daily life

Smartphones have become an important part daily life, including how we communicate in business. Mobile device security is emerging as one of top targets for cybercriminals. Using Microsoft Word, write a 400 word paper us ...

Review the creating a process driven organization at

Review the Creating a Process Driven Organization at AgCredit case study online, and answer the following questions. Discussion Question: Propose an organizational structure for the IT department that you feel would supp ...

1 explain the different elements of property rights provide

1. Explain the different elements of property rights. Provide an example of how the US economy infringes on each. 2. Explain why inequality is considered to be a social "bad" by many people. In what way could inequality ...

Analyze the time complexity of the following ternary search

Analyze the time complexity of the following ternary search algorithm: identify two points that subdivide a sorted array into three parts. If the given number is equal to one of these two points, we are done. Otherwise, ...

Junit test labyou will be creating a junit test class for

JUnit Test Lab You will be creating a JUnit Test Class for Gradebook.java, that has been provided for you.   Add a getScoreSize() method to the Gradebook class which returns scoresSize; Add a toString() method to the Gra ...

After reading the article 10 techniques for gathering

After reading the article, 10 Techniques for Gathering Business Requirements, think about the following scenario and answer the questions provided. Wilmington University is implementing a mobile app where students are ab ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As