Help with Problem
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.
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
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
Based on the solution for lab 3
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()).
• 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.
Re: Help with Problem
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.