Find Jobs
Hire Freelancers

data structures and algorithms

$30-250 USD

Fermé
Publié il y a presque 10 ans

$30-250 USD

Payé lors de la livraison
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.
N° de projet : 6291337

Concernant le projet

2 propositions
Projet à distance
Actif à il y a 10 ans

Cherchez-vous à gagner de l'argent ?

Avantages de faire une offre sur Freelancer

Fixez votre budget et vos délais
Soyez payé pour votre travail
Surlignez votre proposition
Il est gratuit de s'inscrire et de faire des offres sur des travaux
2 freelances proposent en moyenne $58 USD pour ce travail
Avatar de l'utilisateur
A proposal has not yet been provided
$60 USD en 3 jours
0,0 (0 commentaires)
0,0
0,0
Avatar de l'utilisateur
A proposal has not yet been provided
$55 USD en 3 jours
0,0 (0 commentaires)
0,0
0,0

À propos du client

Drapeau de INDIA
Delhi, India
4,8
88
Méthode de paiement vérifiée
Membre depuis août 5, 2011

Vérification du client

Merci ! Nous vous avons envoyé un lien par e-mail afin de réclamer votre crédit gratuit.
Une erreur a eu lieu lors de l'envoi de votre e-mail. Veuillez réessayer.
Utilisateurs enregistrés Total des travaux publiés
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Chargement de l'aperçu
Permission donnée pour la géolocalisation.
Votre session de connexion a expiré et vous avez été déconnecté. Veuillez vous connecter à nouveau.