Question: JAVA CODE PLEASE! This should increase the tultion cost of students [1] by 10%. The resulting tuition cost will be: 13200.00 If instead, I passed
JAVA CODE PLEASE!
![JAVA CODE PLEASE! This should increase the tultion cost of students [1]](https://s3.amazonaws.com/si.experts.images/answers/2024/08/66d2c79903ce4_68866d2c798439e3.jpg)

![passed in (students[2], 5), the resulting cost will be: 9450.00. METHOD TWO](https://s3.amazonaws.com/si.experts.images/answers/2024/08/66d2c79acbeba_69066d2c79a49ebf.jpg)

This should increase the tultion cost of students [1] by 10%. The resulting tuition cost will be: 13200.00 If instead, I passed in (students[2], 5), the resulting cost will be: 9450.00. METHOD TWO Method getStudentsByYean will take an arfoy of Student and a StudentYear enum. The method will return an array of students that have match that student year. For example: student[] matches = Personutilities.getstudentsbyrear (students, Studentrear. FRESHMAN); This method should return an array with two students: Bob smith and Andy lohnson. If I passed in StudentYear JUNIOR, the method would return the following students: Sue Storm and Richard Reeds. METHOD THREE Method findProfessors WhoT each will take an array of Professor and a String containing the subject to look for. The method will return a list of all professors who teach that subject. This search SHOULD NOT AE CASE SENSITIVE. Create a class called PersonUtilities in the com,utilities package. You will be writing three methods total! If you want to add private methods to simplify your code, you can do so. Code for testing all three methods can be found in the Demo dass (shown above). The class outline is below. Ift com.utilities C PersonUtilities 5 increaseTuition(Student, int) : double getStudentsBy Year(Student[], StudentYear) : Student[] findProfessorsWhoTeach(Professor[L String) : ArrayList METHOD DNE Method increaseTuition will take one Student object and an int. The int represents the percentage out of 100 . Method will update the price of the student's tuition by the percentage and the method will return the updated tuition cost. For example: double newCost = PersonUtilities .increaseTuition(students [1],10); ff Test getstudentssyrear here for fREsreits sruocists ff Test getstudentscy Year here for Jumor sTocNTs If Test f indProfessorskthofeach for morld history" If Test findorofessorskhofeach for cotcutus" nenysa 4 stuoentre package com-entities; Inport java,ut11. Arraytist; import jovo.util. Arrays; public class StudentDeno \{ poblic static void eain(String[] args) \{ Student[] students - new Student[5]: students[e] - new Student ("Hob*, "Sith", StudentYear. FRFsiecev, 100e0); students[1] - new Student("Sue", "Stom", StudentYear, JnoroR, 12ee9); students[2] = new Student ("Andy", "Johnson", Studeatrear. FREsiwev, 9eee); students[3] - new Student ("Richard", "Reeds", StudentYear. JumroR, 15000); students [4]= nes Student("B11], "Howards", StudentYear. Sopenose, 11000); Professor[] professors = new Protessor[5]; String[] subjects - \{ "us Mistory", "Calculus", Norld Wistory" ); professors [] = new Profestor ("Charles", "Xavder", subjects); String[] subjects2 - \{ World Kistory": "Psychology };: professors [1] = new Professor("Nick", "rury", subjects2); String[] subjects3- \{ "Calculus", "Algebra"); professors [2] = nes, Professor("Jean", "Grey", subjects3); String[] subjects4 - ( "Intro to Law", "Lha II, "World History "); professors[3] - hes Professor ("Mate", "Wurdock", subjects4); String[] subjects5 - \{ "Artificiol Intelligence", "Hetaphysics", "Calculus"]; professers [4] = new Professor("Eruce", "Banner", subjects5); double newcost= Personut11ities. Ineneasetuition (stidents [1],16); System,out.printlnn(newcost+ should equal tidudents[2].getTultion ()+1n2); Studeat[] freshran = Personutilitles. getstudentayVear (students, StudentYear. FREsWewV); Systen.out.printlin(-Freshnan Students: " Arrays, tostring(freshman)); Student[] studeat1 - PersonUtilities.getStudentbyYear(students, StudentYear. JukraR); Systen.out. printin("Junion Students1 + Arrays, tostring(student1))
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
