simeesta's Profile User Rating: *****

Reputation: 214 Stalwart
Group:
Active Members
Active Posts:
586 (0.34 per day)
Joined:
04-August 09
Profile Views:
13,436
Last Active:
User is online A minute ago
Currently:
Viewing Forum: Java

Previous Fields

Country:
GB
OS Preference:
Linux
Favorite Browser:
FireFox
Favorite Processor:
AMD
Favorite Gaming Platform:
Who Cares
Your Car:
Who Cares
Dream Kudos:
0

Latest Visitors

Icon   simeesta is wondering what his status is.

Posts I've Made

  1. In Topic: Printing Partitions of a Number Using a Constraint on Number of Values

    Posted 15 Apr 2014

    It also depends on whether you consider 1+3 to be the same as 3+1 and whether you allow 0 ie 0 + 4.

    Sorry. Misread your post. Forget that.
  2. In Topic: Help with input for towers of hanoi problem

    Posted 15 Apr 2014

    The problems in your main function:

    public static void main(String[] args){
    		Scanner keyboard = new Scanner(System.in);
            System.out.println("Enter the number of disks:");
            n = keyboard.nextInt();
            System.out.println("\nChoose a starting Tower 1,2,3");
    		int start = keyboard.nextInt();
    		System.out.println("\nChoose an ending Tower 1,2,3");
            int end = keyboard.nextInt();
            moves = 0;
    		for(int i = n; i > 0; i--){
    			tower1.push(i);  // This should be the start tower - may not be tower1.
    		}//Ending bracket of for loop
    		display();
    		moveDisks(n, tower1, tower2, tower3); // the order of arguments should change depending on user input - you will have to do this
           System.out.println("\n\n" + n + " disks took " + moves + " moves\n\n");
        }
    
    


    One way to manage the reordering reordering would be to store the towers in an array.
    array[start-1] will give you the start tower
    array[end-1] will give you the end.
  3. In Topic: Java Convert String of XML to Document object is null all the time

    Posted 15 Apr 2014

    The xml has been parsed correctly and it is not null (see here) . However v.getXML().toString(); isn't enough to get the string back.
    To get the string from the document you'll need to do something like this.
  4. In Topic: [HELP] Trouble to understanding the Algorithm

    Posted 15 Apr 2014

    You have a 9x9 grid. If 4 is entered the fourth row will have numbers 1 - 9 and the fourth column will have the numbers 1-9. The rest will be '#'. What don't you get?
  5. In Topic: help on adding constrcutors

    Posted 14 Apr 2014

    #ifndef MYCLASS_H
    #define MYCLASS_H
    
    
    class MyClass
    {
        public:
            MyClass();
            virtual ~MyClass();
        protected:
        private:
    };
    
    #endif // MYCLASS_H
    
    

    This code doesn't tell us anything. It's just an empty class. What do you want your class to do?

    Should these methods:
    int Addition(int,int);
    int Subtraction(int,int);
    int Multiply(int,int);
    int Divide(int,int);
    
    

    be part of the class?

    Should the numbers?

    I can only guess. Do you want something like this.

    The first thing you need to do is work out what your class should do.

    This link on classes may help.

My Information

Member Title:
Deadly Ninja
Age:
22 years old
Birthday:
September 29, 1991
Gender:
Location:
London
Interests:
Computers, Maths, Karate, Films, Games.
Full Name:
Simon
Years Programming:
4
Programming Languages:
C/C++, Haskell, Java, X86/X86-64 assembler, prolog, MATLAB.

Contact Information

E-mail:
Click here to e-mail me
Website URL:
Website URL  http://
Facebook:
http://www.facebook.com/sapensadler

Comments

Page 1 of 1
  1. Photo

    David W Icon

    07 Jun 2012 - 01:52
    Whow ... you may like to see/use some of the C help files like
    readLine.h
    Cvec.h
    Clist.h
    and their help function files
    at ...
    http://developers-heaven.net/forum/index.php/topic,2580.0.html
    and ...
    http://developers-heaven.net/forum/index.php/topic,2582.0.html
Page 1 of 1