Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Vectors

  1. #1
    Junior Member
    Join Date
    Oct 2010
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Vectors

    Hello! First of all my name is Francesco and i'm new to Java and this forum.

    I have a test to take and i don't manage to do it alone.

    I'm hoping that someone can help me get thru it.My whole future depends on my exam

    This are the requests:

    I need to create a class named "Forza" with a method "Matrice" that does the next operations:
    1.Has the integers "n" and "m"
    2.Has a vector "v" with the dimensions "m"
    3.If the vector is composed of odd numbers or under 18, Exit
    4.Create a matrix with the dimension n X m where the first row is given by the V vector, the second row by the V vector multiplied by 2, the third one, V multiplied by 3 and so on.
    5.Write the matrix in output.

    Should be something like this:

    If the Vector is [3 5 9 1], the matrix to print is:
    3 5 9 1
    6 10 18 2
    9 15 27 3
    12 20 36 4
    15 25 45 5

    Hopefully i didn't posted in the wrong section.

    As i said...my future depends on this.Please help.Thank you!


  2. #2
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,320
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: Vectors

    No one is going to do this for you. I suggest you make the effort to get started, if you have a problem along the way post some code, a specific question about the code, full error messages if there are any, what behavior you expect, and if it is different the behavior you are getting. If you are completely confused, you can start here:
    Trail: Learning the Java Language (The Java™ Tutorials)
    My whole future depends on my exam
    Your future depends upon every choice you make, including trying to cheat to get someone to do the assignment for you.

Similar Threads

  1. Need help with Vectors
    By Locky in forum Collections and Generics
    Replies: 6
    Last Post: October 19th, 2010, 04:45 PM
  2. New to vectors passing parameters
    By osmaavenro in forum What's Wrong With My Code?
    Replies: 3
    Last Post: September 30th, 2010, 04:32 PM
  3. Question regarding bit vectors...
    By ADizzle491 in forum Java Theory & Questions
    Replies: 3
    Last Post: September 21st, 2010, 08:50 PM
  4. Vectors
    By mgutierrez19 in forum Collections and Generics
    Replies: 4
    Last Post: March 3rd, 2010, 11:46 AM
  5. Replies: 3
    Last Post: November 15th, 2008, 07:17 AM