I managed to update my customer class...but I dont understand how I can increment the waitingTime to every customer that's in the queue, rather than doing it in the customer class? Do I need to write...
Type: Posts; User: orbin
I managed to update my customer class...but I dont understand how I can increment the waitingTime to every customer that's in the queue, rather than doing it in the customer class? Do I need to write...
The problem I'm having is setting up the classes with their methods to be really solid for the main simulation. This is for a capstone project which wants you to simulate a coffee shop service. There...
In my class we are dealing with Binary Tree's and Recursive methods which call themselves. However, I'm having trouble following the methods.
public class BinaryTree{
private class Node
{
I've written a Queue class for an assignment and a Linked List for a seperate assignment. However, now the teacher wants us to implement the LinkedList class into our Queue class. I don't understand...
I'm having trouble understanding your if methods that involve "processing" the delimeter. What do you mean by process left delimiter and right delimeter? This is what I have so far following your...
Right now in my class we are dealing with array stack data structures. I have successfully put together an array stack class which creates a stack that holds strings(or in my case string elements)....
I managed to fix the problem. I just had it keep generating a random number between 1 and 100 until it got a successful insertion. However, on the merged list, if it found a duplicate I'd just have...
I solved the problem by adding an else method and it does work now. However, I keep running into more problems! I need to generate two lists of 10 DataElements each, and none of the numbers can be...
I noticed after a bit of tinkering with the code that it always gets a true on the first insertUnique run through, but the second time it runs through it stalls.
public int...
Thank you for your help. It helped me rethink the problem. I managed to figure out a lot since the other day. However, now I'm having trouble insert a UNIQUE number into a list. I made two methods,...
I tried to read it like that but I think I'm over complicating my program. I updated my code, but still stuck on 3b case.
public boolean insert(DataElement insertItem){
...
We are supposed to write an insert method for an ordered link list. I'm working on the method and have most of it written in my OrderedLL class. However, I can't seem to understand how to deal with...
Last week we had an assignment to create an Unordered Link List using an abstract class. However, now the teacher wants us to implement an Ordered Link List using an interface but I'm not quite sure...
Been racking my brain. I can't figure out now why my average and stdDeviation method aren't working anymore.
public abstract class LinkedList{
protected class LinkedListNode{ //...
I'm working with on a LinkedList assignment, however I've written the methods for splitting the list into two equal lists, but when I apply the average it only applies it to the first half of the...
Thanks once again. I managed to solve the problem by declaring it into my UnsortedArrayList class.
public abstract class ArrayListClass{
protected int length; //to store length of the list...
Thank you for taking the time to write that out. That makes a lot of sense now that you brought it to my attention. I've never really created troubleshooting checkpoints unless it was something very...
I got further into the program but now it's telling me I get an error about a specific line. I'm trying to generate 100 random numbers between 1 and 100 and put them into the ArrayListClass log. Then...
I have to create a couple methods from all these classes such as finding the lowest and largest numbers, sum of all the values in the list, and average. You can only add them to the UnsortedArrayList...
I forgot to correct that. I had to type it out since it was in the book, and it was meant to be 1 and 1000. (It originally said 1 and 10000...but the teacher said to just use 1000.) Also, there is...
I think I had a breakthrough, but it frustrated me! I was thinking about it all wrong looking back. This is what I have so far.
import java.util.Random;
public class TestLuck{
I think might be overthinking this but the way I keep looking at it is...let's say I use log.insert(randomnumber); and then use the contain method to search for 433(just a random number I picked...
Thank you for replying. I understand that I can use the contain method, but I'm still having trouble understanding finding a duplicate. If I use the contain method, it goes through the whole array,...
I'm currently trying to finish an assignment but having trouble conceptualizing what I'm trying to achieve.
The assignment is as follows:
Create an example/application called TestLuck that...
We were given a lab that I'm very confused over the teacher's notes. However I have figured the program out for myself, using my way but not sure if it's actually using composition. "A relationship...