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 6 of 6

Thread: Java test questions

  1. #1
    Junior Member
    Join Date
    Sep 2013
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Java test questions

    I am having trouble solving these questions that could be on my test in 3 hours:

    1. 5 factorial is the product of 5, 4, 3, 2, 1. 10 factorial is the product of the integers 10 down to 1. Write a program that displays the value of 5 factorial. In the same program compute and display the value of 10 factorial making use of the result you computed for 5 factorial. Be sure to display your results with appropriate labels.

    2. Write a program that computes and displays with an appropriate label the value of
    (5) (6) (7)
    ------------
    (2) (3)


  2. #2
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,517
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: Java test questions

    A forum is not a good place to post a request for urgent help or help with anything that includes a deadline that's closer than 2 or 3 days out. Asking for help with no apparent effort on your part is also a faux pas. For these transgressions, those who might otherwise provide assistance will chuckle and then ignore.

  3. #3
    Junior Member
    Join Date
    Sep 2013
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Java test questions

    I am basically asking for a more in-depth explanation of each question. I am not looking for coding, I frankly just don't understand what each question is truly looking for.

  4. #4
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,517
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: Java test questions

    You should have said, though time-critical topics are still often ignored.

    What don't you understand? The first is straightforward to me but may not be to you, so explaining what you don't understand would be helpful.

    The meaning of the second might be obscured by the limitations of this medium. Why are the numerals in parentheses? Is that supposed to be ( 5 * 6 * 7 ) / ( 2 * 3 ) ?

  5. #5
    Member
    Join Date
    May 2013
    Posts
    106
    My Mood
    Amused
    Thanks
    16
    Thanked 9 Times in 9 Posts

    Default Re: Java test questions

    Number 1 looks like a good candidate for recursion, since it involves factorials. But you can probably do it with a for loop that counts down. In a nutshell, the question is asking: "If given the number 5, write a program that calculates 5*4*3*2*1."

    Number 2 looks weird, like it just wants a quick program that does division of 2 sets of numbers. I'd ask my teacher for clarification if I were in your shoes.

  6. #6
    Junior Member
    Join Date
    Sep 2013
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Java test questions

    Quote Originally Posted by GregBrannon View Post
    You should have said, though time-critical topics are still often ignored.

    What don't you understand? The first is straightforward to me but may not be to you, so explaining what you don't understand would be helpful.

    The meaning of the second might be obscured by the limitations of this medium. Why are the numerals in parentheses? Is that supposed to be ( 5 * 6 * 7 ) / ( 2 * 3 ) ?
    Honestly, I do not know factorials, but I am going into class early to learn a little before the test.

    The parentheses through me off as well, I am wonder the same as you about the multiplication.

Similar Threads

  1. Help please to solve the Java test
    By frictionmind in forum Java Theory & Questions
    Replies: 1
    Last Post: July 19th, 2013, 07:41 AM
  2. how to test arrays in a terminal in java?
    By hemla in forum Java Theory & Questions
    Replies: 5
    Last Post: April 11th, 2013, 06:55 AM
  3. List of my Java3D Questions, and Proguard questions
    By Zachary1234 in forum Java SE APIs
    Replies: 0
    Last Post: November 16th, 2012, 09:40 PM
  4. Java + Web form + Test
    By lidersoul in forum Java Networking
    Replies: 0
    Last Post: September 26th, 2012, 03:16 PM
  5. Challenging Java Question: Test your Java skill by grouping these terms
    By karthickk3 in forum Java Theory & Questions
    Replies: 3
    Last Post: July 18th, 2012, 10:10 PM