Lengkap

Write some Software

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, "[url removed, login to view]"). 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).

Example

Here is a sample input file:

A

E Kanga 26 F

E Tigger 28 M

E Pooh 31 M

L

D Tigger

E Rabbit 30 M

A

S

E Eeyore 36 M

W Kanga

P

Q

Here is the output that corresponds:

Welcome to Camp Posanivee!!

Command: A

There are no campers.

Command: E Kanga 26 F

New camper added.

Command: E Tigger 28 M

New camper added.

Command: E Pooh 31 M

New camper added.

Command: L

Alphabetical List of Campers:

Kanga

Pooh

Tigger

Command: D Tigger

Name: Tigger

CISC 503 Lab #3 Dr. Jeremy Lanman

Page 3 of 3

Age: 28

Gender: M

Command: E Rabbit 30 M

New camper added.

Command: A

Average age = 28.75

Command: S

Camper count by gender:

boys = 3

girls = 1

Command: E Eeyore 36 M

New camper added.

Command: W Kanga

Camper withdrawn.

Command: P

Preorder Traversal:

Pooh

Eeyore

Tigger

Rabbit

Command: Q

End of program.

Bring plenty of calomine lotion!

Kemahiran: Java

Lihat lagi: software write mq4, software write chip epson, useful software write book, software write web specs, free software write user guide, software write edid, free software write company profile, software write websites idea, software write book images, software write books, software write protection, free software write book, software write book, software write protect software, software write technical manual

Tentang Majikan:
( 6 ulasan ) Plant City, United States

ID Projek: #11944471

Dianugerahkan kepada:

xeathprynx

Hello, I am expert in java/c/c++ and i can deliver your task in the least time and least payments. The code will be well commented and well formatted for better understanding. I believe in long term relations so first Lagi

$50 USD dalam sehari
(43 Ulasan)
4.6

10 pekerja bebas membida secara purata $131 untuk pekerjaan ini

AwaisChaudhry

Hi there! I have read what you exactly need, however I would like to ask you a few questions. I wouldn't call myself a master but I do work smart and do not rest until I get the job done. Please feel free to ping me an Lagi

$155 USD dalam 3 hari
(27 Ulasan)
6.1
$35 USD dalam sehari
(32 Ulasan)
4.9
Softeria

My Degree is MS Computer Software Engineering. I teach Data structure and Algorithm. I have Excellent concepts linked lists, pointers, Trees, Binary Trees, stack and queues, FIFO, LIFO, recursion Graphs, Complexity an Lagi

$150 USD dalam 5 hari
(8 Ulasan)
4.3
$98 USD dalam sehari
(8 Ulasan)
4.1
$222 USD dalam sehari
(11 Ulasan)
3.7
rajdeepa555

Hello Sir, I have 6 years of experience in J2EE,c#,C, php, python based technologies. Regarding front end technologies, I am proficient in html, java script, jquery. My recent java works are as follows - I'm Lagi

$250 USD dalam 3 hari
(5 Ulasan)
3.6
SabidHabib

hello sir, I read your description and I can do it [login to view URL]'s discuss in detail. I am an expert in Java.

$80 USD dalam 0 hari
(17 Ulasan)
3.1
abubakar4248

Hi... i read the descriptions and understand i will provide quality work according to your requirement in given time period i will work on our project until you satisfy i am professionally software engineer(P Lagi

$133 USD dalam 3 hari
(2 Ulasan)
1.8
yogisharma66

Hey there, I have read your job description and i am very confident about doing this project. Let me introduce myself, My name is Sumit Kumar and have done my Engineering from University of South Carolina. I am a ve Lagi

$155 USD dalam 3 hari
(0 Ulasan)
0.0
$155 USD dalam 3 hari
(0 Ulasan)
0.0
DevJones

Hi Jones here, I hope you will consider me for your project. I will assure you a quality end product at a competitive price. I know you will be swamped with bids so thank you for the time. Hoping to hear from you soon Lagi

$155 USD dalam 3 hari
(0 Ulasan)
0.0
quickwriter24

We are highly experienced Post Graduate Engineers, Doctors, IT, ITES, Software, Infrastructure Professionals, Web Designers and IT Architects. We can redo, improve, and publish any engineering, scientific MATLAB, S Lagi

$150 USD dalam 3 hari
(0 Ulasan)
1.5