Results 1 to 2 of 2
  1. #1
    natec33 is offline Member
    Join Date
    Feb 2014
    Posts
    1
    Rep Power
    0

    Default Help with Problem

    Hey guys,

    I'm new with java and am taking a class in which we have to complete 2 problems I am having some trouble with. The problems are meant to be relatively basic and use very introductory methods.

    1.

    Create an application that
    • Creates 4 students
    o Build upon the solutions of the previous labs (e.g., using app.java and student.java)
    o You will need a version of student.java that has a working whatsup( ) method
    • Creates a group
    o First you have to design the new Java class called group
    • A group has a name
    • A group has 4 students
    • Create a method in group.java that
    o displays the group name and the name of each student in the group
    • in app.java
    o using a method in group.java
    o from app.java, display information about what the third student in the group (not the student in the app) is up to now.
    o For instance: “John” is “doing Java”
    o Pay attention, you have to use a method in group.java
    Suggestions:
    o Start by creating a class called group with only one attribute, GROUP_NAME
    o Make it work, using the app to display only the group name
    o Then you think how to add the students to the group (this is tricky…, but that’s what you have to learn with this lab)

    -We are just beginning to use dot notation


    2.

    Based on the solution for lab 3
    • app.java
    • student.java
    • group.java
    create an application that displays the participation of a group.

    Participation of a group is the sum of all the students participation. Participation is an int number that varies from 1 to 10.
    - 1 meaning very little participation
    - 10 meaning great participation

    For instance, when the method is called we may have student member #1 John with a participation of 3, student #2 Mary with a participation of 10 and student #3 Fred with a participation of 5, which will give a participation of (3 + 10 + 5 = 18)
    Student’s participation should be calculated as a random number (in a similar fashion of whatsUp()).

    Suggested roadmap:
    • You will need a new method called participation in student.java
    • Start by copying the whatsUp method in student.java to create a participation method in student.java.
    • Make the necessary adjustments for it to return a number (it can be an int number from 1 to 10)
    • Then work on a participation method on group.java gathering participation from each student in the group
    • In the app.java create students and create a group (from previous labs and assignments), and then display the group participation


    Any help you guys may be able to provide would be immensely appreciated.

    Thanks

  2. #2
    notivago is offline Heavy Coffe Drinker
    Join Date
    Feb 2014
    Location
    São Paulo, Brazil
    Posts
    29
    Rep Power
    0

    Default Re: Help with Problem

    So...

    Do you have a question or you came here expecting anyone would do the homework for you?

    What have you done so far?

    By the way the assignment itself is doing a lot of spoonfeeding already, if you are paying any attention to the course you should be able to complete it.

Similar Threads

  1. Problem with a Simple Histogram Problem
    By kathmandu in forum New To Java
    Replies: 12
    Last Post: 06-25-2013, 02:19 AM
  2. Replies: 0
    Last Post: 11-07-2012, 01:44 PM
  3. Small problem with problem with Java, C++ parse program.
    By dragstang86 in forum New To Java
    Replies: 4
    Last Post: 10-30-2011, 04:43 AM
  4. Replies: 9
    Last Post: 09-21-2010, 05:15 PM
  5. simple line problem / for loop problem
    By helpisontheway in forum New To Java
    Replies: 1
    Last Post: 11-17-2009, 07:12 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •