Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Do not use complicated ways or other packages Contents Create an application that: Creates 4 students Build upon the solutions of the previous labs (e.g.,

image text in transcribed

Do not use complicated ways or other packages

Contents Create an application that: Creates 4 students Build upon the solutions of the previous labs (e.g., using app.java and student.java) You will need a version of student.java that has a working whatsup) method . Creates a group First, you have to design the new Java class called group A group has a name -A group has 4 students . Creates two methods in group.java 1. A method that displays the group name and the name of each student in the group 2. A method that displays the participation in a group. Participation is the sum of all the group members' (students) participation. Participation is an int number that varies from 1 to 10 (1 meaning very little participation, 10 meaning great participation). Participation starts in student using a random number (in a similar fashion of whatsUp)) to return the student's 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 in app.java Using the group variable (instance, object) in group.java: 1. Display the group name, and total group participation 2. Display information about what the third student in the group (retrieving information from the student class variables in the group, not from student variables in the app) is up to now (use the whatsUp) method). For instance: "John" is "doing Java Pay attention, you have to use a the group variable (instance, object) in app.java . Something like System.out.println("the student is " + g1. ): Suggestions: . Start by creating a class called group with only one attribute, GROUP NAME .Make it work using the app to display only the group name Add the students to the group (this is tricky, but that's what you have to learn with this lab) . See the examples in the lesson: video a For Calculating Participation: . 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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Why are depositions a powerful tool in obtaining information?

Answered: 1 week ago

Question

When is it appropriate to use a root cause analysis

Answered: 1 week ago