Waived!

Modify your assignment submission code to answer the following questions 1 Create an interface

(5 customer reviews)

Original price was: $10.00.Current price is: $5.00.

Download button will appear immediately after successful payment.

Full support will be provided with necessary files installation.

Get impeccable customized solution within 24 hours, hassle-free.

View Details
Solved By Verified
Study Co-Pilot All Study Co-Pilots are evaluated by Gotit Pro as an expert in their subject area.
Instant
Download

Description

Modify your assignment submission code to answer the following questions:

1. Create an interface StudentModel for the student model to store student data you wish to keep unchanged such as studentID and StudentEmail. Modify the existing Student class to implement StudentModel and convert it to an abstract class with the reportReport and deleteStudent as the abstract methods.

2. Consider the following two implementation options for student search for Array and ArrayList respectively. Implement a search without a for loop, you may use methods within the two data structures to optimize the code.

public void searchStudent(String searchID)

{

int foundIndex = findStudentByID(searchID);

if (foundIndex != -1)

{

System.out.println(“Student found:”);

System.out.println(“Student ID: ” + studentIDs[foundIndex]);

System.out.println(“Student Name: ” + studentNames[foundIndex]);

System.out.println(“Student Email: ” + studentEmails[foundIndex]);

System.out.println(“Student Course: ” + studentCourses[foundIndex]);

}

else

{

System.out.println(“Student with student ID ” + searchID + ” was not found.”);

}

}

private int findStudentByID(String searchID)

{

for (int i = 0; i < studentCount; i++)

{

if (studentIDs[i].equals(searchID))

{

return i;

}

}

return -1;

}


You may also like…