Find Jobs
Hire Freelancers

data structures and algorithms

$30-250 USD

Lukket
Slået op næsten 10 år siden

$30-250 USD

Betales ved levering
import [login to view URL]; import java.io.*; /**************************************************************************** * CampPosanivee * The program will keep track of who is enrolled for the two-week summer * camp. The program uses a binary search tree to maintain the set of campers * enrolled in Camp Posanivee. The program is not case sensitive and read a * text file to process commands. The commands include: H (help), E (enroll * new camper), W (withdraw a camper), D (display the age and gender of a * camper), A (display avg age of campers), L (list all campers), S (print the * number of boy and girl campers), P (display all campers names in preorder), * Q (quit). * * @author Name * @version 1.0 * @date Date * *****************************************************************************/ public class Posanivee { static String name; static String age; static String gender; static Camper camper = null; /************************************************************************* * main The main method is the controlling method for Camp Posanivee. * Preconditions: must have properly formatted data file. * Postconditions: be able to create a Queue and BST for data. * @param args * @throws IOException ************************************************************************/ public static void main(String[] args) throws IOException { [login to view URL]("Welcome to Camp Posanivee!!\n"); Scanner user = new Scanner( [login to view URL] ); String inputFileName; //[login to view URL]("Input File Name: "); //inputFileName = [login to view URL]().trim(); ArrayList CustQ = new ArrayList(); ArrayList WaitTime = new ArrayList(); //double totmins = 0; try { BufferedReader in = new BufferedReader(new FileReader(new File("[login to view URL]"))); for (String x = [login to view URL](); x != null; x = [login to view URL]()) { Camper[] a = {1,5,2,7,4}; BST bst = new BST(); //for(Camper n : a) [login to view URL](n); } /**************************************************************************** * Camper class The camper class is intended to create a comparable class of * campers. The data structure includes name, age, and gender and the * information is stored in a binary search tree using a queue. * * @author Name * @version 1.0 * @date Date * @course * @instructor ***************************************************************************** / public class Camper implements Comparable { Camper doug = 26; BST(Camper Doug); } /**************************************************************************** * Binary Search Tree class * * @author Provided by Instructor * @version 1.0 * @date Date *****************************************************************************/ public class BST { private class treenode { Comparable item; treenode left, right; } treenode root; // ref to the root of the bst int count; private Queue Q; // create for info public static final int PREORDER = 0; public static final int INORDER = 1; public static final int POSTORDER = 2; public BST() { // create an empty BST object root = null; count = 0; Q = new QueueLL(); // create new LL for objects } public void makeEmpty() { root = null; count = 0; z [login to view URL](); } public boolean isEmpty() { =================== Deliverable will be - The program I started with modifications to make it function. PFA the sample output.
Projekt-ID: 6291337

Om projektet

2 forslag
Projekt på afstand
Aktiv 10 år siden

Leder du efter muligheder for at tjene penge?

Fordele ved budafgivning på Freelancer

Fastsæt dit budget og din tidsramme
Bliv betalt for dit arbejde
Oprids dit forslag
Det er gratis at skrive sig op og byde på jobs
2 freelancere byder i gennemsnit $58 USD på dette job
Brug Avatar.
A proposal has not yet been provided
$60 USD på 3 dage
0,0 (0 anmeldelser)
0,0
0,0
Brug Avatar.
A proposal has not yet been provided
$55 USD på 3 dage
0,0 (0 anmeldelser)
0,0
0,0

Om klienten

Flag for INDIA
Delhi, India
4,8
88
Betalingsmetode verificeret
Medlem siden aug. 5, 2011

Klientverificering

Tak! Vi har sendt dig en e-mail med et link, så du kan modtage din kredit.
Noget gik galt, da vi forsøgte at sende din mail. Prøv venligst igen.
Registrerede brugere Oprettede jobs i alt
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Indlæser forhåndsvisning
Geolokalisering er tilladt.
Din session er udløbet, og du er blevet logget ud. Log venligst ind igen.