Question: 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

1 Expert Approved Answer
Step: 1 Unlock

Java public void addStudentData TODO get the values from the textfields String studIdS studIdgetText... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!