How to collect student subjects and grades alongside in java form | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to collect student subjects and grades alongside in java form

I'm working on a student admission system in java and everything is fine just that I have to collect some data from the student registering. The student's high school results in the form (subject & grades) I've thought of what kind of input can do this job but I haven't seen any. Or how can I implementation this function. If you need any more info to help me please ask

14th Apr 2023, 2:10 PM
Rawley
Rawley - avatar
6 Answers
+ 2
You mean how to link the subject to the grade? I imagine you should have a data model where you store all the grades of a specific student. The implementation would depend on the actual requirement but for example you can use a hashmap where keys are subjects, and values are grades. Or you could have all subjects and all grades in separate arrays, where the index position creates the correspondence between the two. Sorry but you are not explaining very clearly, what your actual question is, and you have not shown any code that you already have, so it's very difficult to guess.
14th Apr 2023, 3:54 PM
Tibor Santa
Tibor Santa - avatar
+ 2
Not the exact same scenario, but you can find loads of tutorials like this online, which show how to create a form in Swing and process the submitted data: https://www.ebhor.com/registration-form-java/
14th Apr 2023, 3:22 PM
Tibor Santa
Tibor Santa - avatar
0
Well doesn't really help I know how to do all that already just don't know how to implement the way the user will input the subjects alongside the grades. If I could get how to do this even in html it's a step forward to doing it in java
14th Apr 2023, 3:29 PM
Rawley
Rawley - avatar
0
"How to implement the way the user will input the subjects alongside the grades" ... Maybe have a look at different layout managers? https://docs.oracle.com/javase/tutorial/uiswing/layout/visual.html
14th Apr 2023, 3:34 PM
Tibor Santa
Tibor Santa - avatar
0
Yes I can handle the UI how it appears but how can I link them together ?
14th Apr 2023, 3:36 PM
Rawley
Rawley - avatar
0
Thanks anyways
14th Apr 2023, 3:55 PM
Rawley
Rawley - avatar