User Profile
Collapse
-
@chaarmann Thanks for all of your help on this. As of right I don't have anymore questions. So I will accept all of feedback that you gave me! -
@chaarmann What would be the purpose of the vertex[numberOfVertice s] == null; statement? Will it return no vertices at all if the method does delete one vertex? As it stands, this line does not complle at all.Leave a comment:
-
-
@chaarmann I went back and tried to implement the fetchVertex and what you said didn't work. Here my snippet code.
Code:public int fetchVertex(int vertexNumber) { if(vertex[vertexNumber] == null) return false; return vertex[vertexNumber]; }Leave a comment:
-
@chaarmann, Okay I went and made a lot of changes but I am still having trouble fetchVertex and update edge and update vertex
...Code:// public boolean fetchVertex(int vertex1) // { // if(vertex[vertex1] == null) // return true; } public boolean fetchEdge(int vertex1, int vertex2) { if(vertex[vertex1] == null || vertex[vertex2] == null)Leave a comment:
-
@chaarmann You know every programmer is always going to have a differrent way to solve a problem. I rather just stick with how I have mines first. I just need help thinking through these methods. Can you please help?Leave a comment:
-
@chaarmann How would I do it with just my implementation that I currently have?Leave a comment:
-
How would you fetch, delete, and update a vertex and edge in java?
I have looked in several different data structures and algorithms books, but I have yet to find any of them useful when it comes to researching how to implement the operations of fetching, deleting, and updating an vertex and edge for a graph in java? Here is my starting program. Any help would be much appreciated or any suggestions to any books that would assist me in this matter?
...Code:public class SimpleGraph // a directed graph
-
dseals22 replied to How can Implement a perfect hashed data structure using the four basic operations?in Algorithms@Frinavale, @chaarmann,
Could I do something like this or do I need to break up my
code into two different classes and then test the methods from the other class inside of another class's main method:
...Code:import java.util.Scanner; public class StadiumTickets { int ticketNumber; // keyfield String purchaserName; public void input() {Leave a comment:
-
dseals22 started a topic Why is the array used for a restricted hashing scheme always sized to a 4k + 3 prime?in AlgorithmsWhy is the array used for a restricted hashing scheme always sized to a 4k + 3 prime?
Why is the array used for a restricted hashing scheme always sized to a 4k + 3 prime? -
How to implement a perfect hashed without Hashtable or HashMap?
If I can't implement a perfect hashed algorithm without using a Hashtable or HashMap,then how is it possible to implement this type of data structure? -
dseals22 started a topic How can Implement a perfect hashed data structure using the four basic operations?in AlgorithmsHow can Implement a perfect hashed data structure using the four basic operations?
How to implement the perfect hashed data structure using the four basic operations (insert, fetch, delete, and update)? Will I have to use a hashtable to do this?
This is my starting pseudocode below:
...Code:public class HashedClass{ int ticketNumber; // keyfield string purchaserName; Hashtable hashtable = new Hashtable(); insert(); fetch(); delete(); -
dseals22 started a topic What is the only condition that would cause dynamic data structure to return . . ."in AlgorithmsWhat is the only condition that would cause dynamic data structure to return . . ."
What is the only condition that would cause the Insert operation of a dynamic data structure to return a “data structure full” error?
I want to know where can I find some resources on this question at, because as of researching for a day and half, I couldn't find information specific to my question. Can anyone help me answer my question? I know that dynamic data structures (such as linked lists) can expand the amount of nodes at... -
dseals22 replied to Why is embedding key-value pairs into URLs (http://www.example.com/foo/bar) better?in ASP Classic@niheel Do you know where I can find more resources on this at? Can you compare the differences between embedding key-value pairs and the GET parameters in more detail? Examples of these comparison with a link source would be great.Leave a comment:
-
dseals22 started a topic Why is embedding key-value pairs into URLs (http://www.example.com/foo/bar) better?in ASP ClassicWhy is embedding key-value pairs into URLs (http://www.example.com/foo/bar) better?
Why is embedding key-value pairs into URLs (http://www.example.com/foo/bar) better than the traditional GET parameter syntax (http://www.example.com ?foo=bar)? -
dseals22 started a topic How do I reinitalize index [top] of both of these restricted structures to 0?in JavaHow do I reinitalize index [top] of both of these restricted structures to 0?
Hello Everyone,
I have question: how do I reinitalize index [top] of both of these restricted structures to 0?
Here is the Stack Push Algorithm:
...Code:if (top == 0) return false; // ** overflow error else { top = top + 1; data[top] = newNode.deepCopy(); return true; // push operation successful -
Can the base address be the smaller than the first element in an array?
Hello Everyone,
I know it might be a basic question, but I am just curious if you find out that the base address of an element is less than the actual number stored in array, is this taken in to account that your base address could be wrong for that element? -
@chaarmann I split up my code, but I confused about what I need to do in each of the four operations to make the StudentListings class work? Here are the classes below:
...Code:public class Student{ private String name; // key field private int ID; private double GPA; public Student(String name, int ID, double GPA){ this.name=Leave a comment:
-
@chaarmann I going to split up my classes into Students and StudentListing. I will post the code soon!Leave a comment:
-
How do I test all of my methods given the code I have?
I have created a Java program that is designed to keep track of student's names, identification numbers, and GPA's, but I want to know how I can test each one of my methods given the code I have? Can someone help me? Thanks! Here is my code of what I have so far. Also, how will my instance variables come into play at when use my methods. Some of the methods that I have are the insert method, fetch method, delete, and update method.
...
No activity results to display
Show More
Leave a comment: