Click here to Skip to main content
15,887,135 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
app.java (initial application)
• MainFrame.java (external JFrame)
• ControlPanel, a Java class for the panel that will contain two other panels, using a layout.
• TopPanel, a Java class for the Panel that will display the group’s name and group's average GPA
• CenterPanel, a Java class for the Panel that will display names and semester GPAs of the 4 students in a group.
• group.java and student.java (a working version from previous labs, might need updates, see important #2 below).
Students should apply consistent indenting in all submissions. This can be done via the NetBeans Source menu.
Contents
You can start with this NetBeans project.
You will create 3 panels and one group object. One panel contains two other panels.
On a top panel you will display the group's name and average GPA.
The center panel will contain 4 buttons displaying the group 4 students name and GPA.

Important - #1 - The single group object
You will create only one group object g1 in this assignment.
There will be only one statement group g1 = new group(...); in the whole application.
Since two panels need to be used, g1 will need to be created somewhere and then pass the object g1 as a parameter to other classes.
Important - #2 - GPA Calculation
Your previous group/student solution might be working this way; otherwise, you will need to updated it.
Because GPA is calculated randomly in student, depending how you calculate it there is a chance that the average group GPA will not match with the displayed sum of each student's GPA.
In order to fix this, you need to:
• in group:
o semesterGPA is calculated using the GPA attribute in student, not the semesterGPA() method in student
• in student:
o it needs GPA as an attribute
o the attribute GPA is calculated in the constructor, when the student is created, calling the semesterGPA() random method
o the semesterGPA() method, whenever it is called, updates the value of the attribute GPA

What I have tried:

I tried coding it but I couldn’t. There are many errors in my code not able to fix then cause im very new to this topic. Please help.
Can anyone team viewer it and fix my code?
Posted
Updated 8-Feb-19 9:58am
v2
Comments
Richard MacCutchan 9-Feb-19 5:51am    
So show the code and the error messages and we may be able to help you.
Richard Deeming 12-Feb-19 13:04pm    
REPOST
This is the same homework assignment you posted back in October:
https://www.codeproject.com/Questions/1263259/Java-GUI-problem-that-contains-panels[^]

The answer has not changed: we still do not do your work for you.

All that has changed is that you've wasted four months waiting for someone else to do your work for you, instead of doing it yourself and asking for help with specific questions.

1 solution

This sound like a homework assignment, so nobody really should be going in and fixing your problem. You are on the right track of coding this together and trying to do this on your own

What the best thing to do for your problem is for you to update your post with a specific block of code that you have AND post in the error messages that you are getting when you execute it.

Once we can see the actual problem, it will make it easier for us to not only help you fix it; but to also help show you why the problem happened. That is some of the best learning you can get.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900