Institute

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: 899604
Joined: Mon Aug 02, 2021 8:13 am

Institute

Post by answerhappygod »

Institute Cinterface Person Name String Arp 2000 Institute Name String Addpersonip Person Countunder Graduate 1
Institute Cinterface Person Name String Arp 2000 Institute Name String Addpersonip Person Countunder Graduate 1 (161.56 KiB) Viewed 45 times
Institute <cinterface Person -name: string -arp 2000 Institute/name: string) +addPersonip : Person) +countUnder Graduate (s: double): int +getGraduate (n :int): Graduate +calculateScore(): double +getName(): string 4 Student -name: string #gpa: double Student name: string gpa : double) Graduate Undergraduate -nbPapers: int +Graduate name :string, gpa : double, nbPapers: int) getNbPapers(): Int +Undergraduate name : string. gpa : double) Interface Person: O METHODS: calculateScore (): calculated as: for Graduate : Score = nbPapers * gpa for UnderGraduate: Score = gpa * 3+ 5 getName(): returns the name of the student. Student class o METHODS: • . Student (name: String, gpa : double): constructor. Graduate class o METHODS: Graduate (name: String, gpa : double, nbPpapers : int): constructor. .getNbPapers(): getter for attribute nbPapers. Under Graduate class O METHODS: Under Graduate (name: String, gpa : double): constructor. Institute class O METHODS: Institute(name: String): constructor. addPerson(p: Person): add a person to the institute. countUnderGraduate (s: double): count the number of Under Graduate in the institute with score grater or equal to s. getGraduate (n: int): this method will return an array containing all the Graduate with number of papers greater than n. . QUESTION: Translate into Java code all the classes
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply