Click here to Skip to main content
16,005,734 members
Home / Discussions / Java
   

Java

 
QuestionGantt Chart's Task Bar Pin
sorrol24-Oct-09 23:48
sorrol24-Oct-09 23:48 
AnswerRe: Gantt Chart's Task Bar Pin
427748025-Oct-09 0:00
427748025-Oct-09 0:00 
GeneralRe: Gantt Chart's Task Bar Pin
sorrol25-Oct-09 16:27
sorrol25-Oct-09 16:27 
QuestionPractical numbers Pin
rics 224-Oct-09 22:35
rics 224-Oct-09 22:35 
AnswerRe: Practical numbers Pin
Richard MacCutchan24-Oct-09 23:23
mveRichard MacCutchan24-Oct-09 23:23 
AnswerRe: Practical numbers Pin
427748025-Oct-09 0:01
427748025-Oct-09 0:01 
AnswerRe: Practical numbers Pin
yohoprashant7-Nov-09 5:37
yohoprashant7-Nov-09 5:37 
QuestionNeed to Confirm Creation of a Array List of Entry Objects Pin
srbruno24-Oct-09 15:57
srbruno24-Oct-09 15:57 
I need to know if I have successfully created a Square Matrix List of Entry Objects. The detail desciption and my java code solution follows:

A) Description
1) The List ADT will export its services to the Matrix ADT.
2) The List ADT will defines a List of Objects. The Objects referred to by these List elements will be defined in the Matrix ADT
3) The Matrix ADT, in file Matrix.java, defines the Matrix class. This class will contain a private inner class that encapsulates the column and value information corresponding to a matrix entry.

B) Code

List.java

class List
{
private class Node
{ Object obj;
Node next, prev;

// Node Constructor
Node (Object o) { this.obj = o; next = prev = null; }

// toString: Overrides object's toString method.
public String toString() { return String.valueOf(obj); }
}

// List Fields
private Node front, back, current;
private int row, length;

// List Constructor
List(int r)
{ front = back = current = null;
this.row = r; this.length = 0;
}
}


Matrix.java
class Matrix
{
private class Entry
{ int col;
double val;

// Entry Constructor
Entry (int col, double val) { this.col = col; this.val = val; }

// toString: Overrides Object's toString() method.
public String toString() { return " (" + col + ", " + val + ")"; }
}

// Matrix Fields
private List[] Entry;
private int size, nnz;

// Matrix Constructor
Matrix(int n) { Entry = new List[n]; this.size = n; nnz = 0; }
}
AnswerRe: Need to Confirm Creation of a Array List of Entry Objects Pin
427748025-Oct-09 0:03
427748025-Oct-09 0:03 
QuestionBeginner to java Pin
ammu2324-Oct-09 5:05
ammu2324-Oct-09 5:05 
AnswerRe: Beginner to java Pin
Nuri Ismail24-Oct-09 5:51
Nuri Ismail24-Oct-09 5:51 
GeneralRe: Beginner to java Pin
ammu2326-Oct-09 19:59
ammu2326-Oct-09 19:59 
Question5 drawings in 5 rectangular regions within one window Pin
WebMaster23-Oct-09 20:19
WebMaster23-Oct-09 20:19 
AnswerRe: 5 drawings in 5 rectangular regions within one window Pin
427748024-Oct-09 0:52
427748024-Oct-09 0:52 
GeneralRe: 5 drawings in 5 rectangular regions within one window Pin
WebMaster24-Oct-09 1:10
WebMaster24-Oct-09 1:10 
GeneralRe: 5 drawings in 5 rectangular regions within one window Pin
427748024-Oct-09 2:50
427748024-Oct-09 2:50 
GeneralRe: 5 drawings in 5 rectangular regions within one window Pin
WebMaster24-Oct-09 8:10
WebMaster24-Oct-09 8:10 
GeneralRe: 5 drawings in 5 rectangular regions within one window Pin
427748024-Oct-09 8:33
427748024-Oct-09 8:33 
GeneralRe: 5 drawings in 5 rectangular regions within one window Pin
WebMaster24-Oct-09 9:47
WebMaster24-Oct-09 9:47 
GeneralRe: 5 drawings in 5 rectangular regions within one window Pin
427748025-Oct-09 0:05
427748025-Oct-09 0:05 
GeneralRe: 5 drawings in 5 rectangular regions within one window Pin
WebMaster25-Oct-09 2:28
WebMaster25-Oct-09 2:28 
GeneralRe: 5 drawings in 5 rectangular regions within one window Pin
427748025-Oct-09 4:29
427748025-Oct-09 4:29 
QuestionJPanel Field day issues Pin
shawndeprey23-Oct-09 3:46
shawndeprey23-Oct-09 3:46 
AnswerRe: JPanel Field day issues Pin
427748024-Oct-09 0:55
427748024-Oct-09 0:55 
GeneralRe: JPanel Field day issues Pin
shawndeprey24-Oct-09 19:52
shawndeprey24-Oct-09 19:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.