View Single Post
  #1 (permalink)  
Old 07-02-2007, 08:15 AM
Marcus Marcus is offline
Member
 
Join Date: Jun 2007
Posts: 92
Marcus is on a distinguished road
Help me with this algorithm
Hello. I can't access ANY methods in the program from the main.

Im trying to access the method "count" from:

Code:
import java.io.*; /** * * @author pag */ public class PriorityQueue implements OrderedQueue { /** Creates a new instance of PriorityQueue */ public PriorityQueue() { } public void addInOrder(Object thisObj) { } public Item remove() { Item x; x = new Item(); return x; } public PriorityLinkedListIterator iterator() { PriorityLinkedListIterator x; x = new PriorityLinkedListIterator(); return x; } public int count() { int x = 0; return x; } }
main:
Code:
import java.io.*; /** * * @author pag */ public class Main { /** Creates a new instance of Main */ public Main() { } /** * @param args the command line arguments */ public static void main(String[] args) { // TODO code application logic here new PriorityQueue(); System.out.println(PriorityQueue.count()); clearscreen(); menu(); } static void menu(){ //display main menu System.out.println("Main Menu"); System.out.println("1. Print messages from file"); System.out.println("2. Place messages in priority queue"); System.out.println("3. Display next item in queue"); System.out.println("4. Print messages in priority order"); System.out.println("5. Display number of items in queue"); System.out.println("6. Write remaining contents to file"); } static void clearscreen(){ for (int i = 0; i < 24; i++){ System.out.println(); } } }
The "System.out.println(PriorityQueue.count)" Dosen't work. The only option netbeans gives me with this class (or any class) is "PriorityQueue.Class"
Help me!

Marcus
Reply With Quote
Sponsored Links