Please solve asap with Details

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Please solve asap with Details

Post by answerhappygod »

Please solve asap with Details
Please Solve Asap With Details 1
Please Solve Asap With Details 1 (138.84 KiB) Viewed 10 times
Write a java application to simulate the following: O O users. User is the superclass of Student W users.User fields: id, name, address n: user input, no of Student / size of the class O O ■ users. Student fields: dept, cgpa users. Faculty is also a subclass of User ■ users. Faculty fields: designation, dept, salary, noOfPublications o docs. Assignment is a non-user class ■ docs.Assignment fields: title, dueDate, courseID, semester, description Now mypkg. MainClass has the main method O ■ Local to static main(): n, studArr, st=null, skd, a, choice, loop variable i ■ In MainClass, there is another static method called getStudent() to find Student instance from the array studArr as called by main in choice 2, follows: in static main, ■ there is an array of Student called studArr of size n ● there is a Faculty instance represented by the handle skd; there is a do-while loop having following choices: O choice==1, add a new Student to the class ■ //add a "new Student().setStudInfo()" to studArr o choice ==2, view details of a particular Student searchId: user input ■ Student st = getStudent (searchId, studArr); if(st != null) st.showStudInfo(); ■ else //error message o choice ==3, view details of ALL Students of the class instance.showStudInfo(); o choice =4, skd give assignment to ALL students ■ Assignment a = new Assignment(); ■ a.setAssignment(); ■skd.giveAssignment(a, studArr); ■ //assigns a to all of studArr ■//show count+1 lines, each line contains: assignmentTitle is given to studentId1 assignmentTitle is given to studentId2 assignmentTitle is given to studentId3 and so on... O choice==5, to exit the do-while loop
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply