Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a generic program to implement student information system. User could be shown following menu. Press 5 to quit 1 - To add a new

Write a generic program to implement student information system. User could be shown following menu. Press 5 to quit 1 - To add a new student 2 Find a student by student Id 3 - Delete a student by student Id 4 List all students On selecting 1, user should be asked for all the attribute values of the student On selecting 2, user should be asked for the student Id. Search should be performed accordingly. On selecting 3, user should be asked for the student Id. Delete should be performed accordingly. On selecting 4, user should be shown all the students with the details. Use the startup code to do the following: 1. Convert the classes and methods to generic where it is necessary 2. Wirte the code for the class MyArrayImpl 3. Write the code for the class SIS 4. Write the code for Student class 5. Write the code for SISTest class 6. Outputimage text in transcribed

image text in transcribed

image text in transcribed

SIS.java ArrayFullExcept X DuplicateExcept MyArray.java MyArrayImpl.jav 1 package sa.edu.yuc; 2 public class Annan FullException extends Exception{ 30 public ArrayFullException(String message) { 4. super(message); 5 } 6 } 7 SIS.java ArrayFullExcept DuplicateExcept X MyArray.java MyArrayImpl.jav 1 package sa.edu.yuc; 2 public class Duplicate Exception extends Exception { 3 public DuplicateException(String message) { 4 super(message); 5 } 6 } ArrayFullExcept DuplicateExcept MyArray.java X MyArrayImpl.jav SIS.java 1 package sa.edu.yuc; 2 public interface MyArray { 3 public boolean isEmpty(); 4 public boolean isFull(); public boolean add(int value) throws ArrayFullException, DuplicateExcept public boolean delete(int value) throws ArrayEmptyException; 7 public int find(int value); public int get(int index); 9} 6 in N 000 8 11 14 16 200 ArrayFullExcept DuplicateExcept MyArray java MyArrayImpl.jav X SIS.java 1 package sa.edu.yuc; 2 3 public class MyArray Impl implements MyArray { 4 private int capacity 5 private int[] arr; 6 private int size; 70 public MyArray Impl(int capacity) { // TODO Auto-generated constructor stub 9 } 100 @Override public boolean isEmpty() { 12 // TODO Auto-generated method stub 13 return false; } 150 @Override public boolean isFull() { 17 // TODO Auto-generated method stub 18 return false; 19 } @Override 21 public boolean add(int value) throws ArrayFullException, DuplicateExcept 222 // TODO Auto-generated method stub 23 return false; 24 } 25 26 @Override -27 public boolean delete(int value) throws ArrayEmptyException { // TODO Auto-generated method stub 29 return false; 30 316 @Override - 32 public int find(int value) { 233 // TODO Auto-generated method stub 34 return 0; 35 } 36 370 @Override 38 public int get(int index) { 439 // TODO Auto-generated method stub 40 return; 41 } 420 @Override 143 public String toString() { // TODO Auto-generated method stub 45 return null; 46 } 47 } 228 244 Console 40 5 6 80 ArrayFullExcept DuplicateExcept MyArray.java MyArrayImpl.jav SIS.java X 1 backage sa.edu.yuc; 2 3 public class SIS { public boolean addStudent (Student st) throws ArrayFullException, Duplica // TODO Auto-generated method stub return false; 7 } public Student findStudent(int id) { // TODO Auto-generated method stub 10 return null; } 12 public boolean deleteStudent(int id) throws ArrayEmptyException { 213 // TODO Auto-generated method stub return false; 15 } public void showAll() { // TODO Auto-generated method stub 18 19 20 } 21 14 817

Step by Step Solution

There are 3 Steps involved in it

Step: 1

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

Video Basics

Authors: Herbert Zettl

8th Edition

1305950860, 978-1305950863

Students also viewed these Databases questions

Question

1. Who is responsible for resolving this dilemma?

Answered: 1 week ago