Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

help me to fill the TODO sections just write the code ... public void addStudentData () { /* TODO: get the values from the textfields

help me to fill the TODO sections just write the code ...

public void addStudentData() { /* TODO: get the values from the textfields */ String studIdS = studId.getText().trim(); String yearStudyS = yearStudy.getText().trim(); /* TODO: validate whether the studIdS and yearStudyS are occupied, BOTH have to be occupied for the add to take place, if one or both are unoccupied print the following message in the validateStudent label -> message to be printed is "Error: cannot add student if studId or year of study not filled in" If both are occupied then go ahead with the addStudentData() */ //do the if...here if (studIdS != studId.getText()){ } //do the else...here, first ensure that the validateStudent label is clear of any text else { Label validateStudent = this.validateStudent; validateStudent.setText("Error: cannot add student if studId or year of study not filled in"); } studentToAdd = null; //use the getInstance() to addStudentData() //select the student that has been added so that it is highlighted on the list }





Step by Step Solution

There are 3 Steps involved in it

Step: 1

Java public void addStudentData TODO get the values from the textfields String studIdS studIdgetText... 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

Java How To Program Late Objects Version

Authors: Paul Deitel, Deitel & Associates

8th Edition

0136123716, 9780136123712

More Books

Students also viewed these Programming questions

Question

Identify some biological bases of personality.

Answered: 1 week ago