Hi all, I am trying to properly code a moveUp() method that will move an item above another in a queue. This method is inside my QueueList class which extends LinkedList. What I am trying to have it...
Type: Posts; User: raphytaffy
Hi all, I am trying to properly code a moveUp() method that will move an item above another in a queue. This method is inside my QueueList class which extends LinkedList. What I am trying to have it...
Hi copeg, thanks for the suggestion. Unfortunately we have not covered Collections and implementation yet in my class, so I'm looking for a simple search algorithm that I can implement in my code.
Hi all, I am coding a project that is supposed to resemble an ER. There's a Patient class that stores name, id, and priority. In my Triage class, I have an array list of patients are initialized when...
Works great! Thanks!
Hi all, I'm trying a simple JUnit test with Eclipse but I'm getting an initialization error (attached screenshot). Just looking for some help as to how to clear this error. Here are my classes:
...
Both are in my Student class:
public class Student
{
public Student( String aFirstName, String aLastName, int aStudentId )
{
firstName = aFirstName;
lastName = aLastName;
studentId...
I only need to retrieve the Student object when the user requests to Remove or Modify one of the Students and that is done through their Integer ID. Adding the equals() method that I coded above did...
Thanks, so I should implement equals() and hashCode() into my GradeBook class?
public boolean equals( Object otherObject )
{
if( otherObject == null ) return false;
if( getClass() !=...
Hi all, my assignment is to use TreeMap to sort Student objects. Students have a first name, a last name, and a unique integer ID. The sample program looks like so:
Sample Program
A)dd R)emove...
Hi, thanks for the schooling. I did realize that the algorithm was a bit off and revised my code, I just didn't post the revised code:
import java.util.ArrayList;
public class Sentence
{...
Thank you! It's been bothering me for a while now. Would you mind showing me how you would tidy up my code? I'd like to get into the right habits ahead of time so that I can continue practicing good...
Hi all, I have a programming assignment that is described as follows:
Use recursion to implement a method boolean find(String t) that tests whether a string is contained in a sentence:
Sentence...