Menu

Infosys University Wants Automate Process Registering Students Different Course Course Reg Q43855461

infosys university wants to automate the process ofregistering students to different course. the course registrationclass has bben created to help in the process of courseregistration.
usage Problem Description Hi, this is Steve from the year 2121. No programmer is known to be alive today. FCorp Rescue Organi• Add Qualifying Candidates Get Candidates Report Artifacts Description: Description Implemented File Name application.Candidscenarios. The code to invoke the Application class methods and to di play the appropriate output is already provided. Notes:ge Candidate successfully taken into the Defense Squad Invalid Inputs: • For invalid name Crime Master Gogo 99, output shoue usage • For invalid height-1.7 m or invalid weight O kg, output should be: Height or weight cannot be negative or zerousage Objects of these classes are used to transfer values between the different layers of the application. You need to use tapplication.Candidate o name: String - country: String citizenld: String u dob: LocalDate • heightWeight: Map<String, Float oCandidateReport (Implemented) application.CandidateReport o name: String • citizenld: String obmic Float squad: String .getNaapplication. Validator • validate(candidate Candidate): void .isValidName(name: String): Boolean .isValidAge(dob: LocalDate):age • It should ONLY have alphabets. • It should have a maximum of three words. • If the above conditions are satisfied, retu• The SecondPart should be any 6 digit number, where all the digits are NOT same. The ThirdPart should be the initials (first.getCandidatesReport(squad: String): List<CandidateReport> addCandidate(Candidate candidate) • This method will receive a Can• If BMI >= 25.0 and BMI < 30.0, allot Defense Squad. • Invoke addCandidate() method of the DataProvider to save the candidUse try catch block to log the exceptions, and re-throw them. Log only the application exceptions. DataProvider: application.wide usage • This method returns a List<Candidate with the required details. JUnit Test Cases: Implement the following test cusage Problem Description Hi, this is Steve from the year 2121. No programmer is known to be alive today. FCorp Rescue Organization has sent me back in time with a special task for you. The Genetic Modification experiment on humans has failed, and these modified humans are causing disruption and damage everywhere on earth. Worldwide, FCorp is recruiting people to gain control over this chaos. Volunteering candidates need to register themselves. Medical fitness is a mandate. They will be allotted one of the three squads (Field, Hover and Defense) based on their BMI (Body Mass Index) values. An application is urgently required to ease the recruitment process. A reporting module is also expected, using which FCorp can get the details of the candidates in a particular squad. Our analysts have already arranged the requirements and design, which are given below. I have only 3 hours before the time portal closes. The future is in your hands, Hurry! It includes the following two modules: • Add Qualifying Candidates • Get Candidates Report Artifacts Description: Description File Name application. Candidate Report.java application.DataProvider.java application. Tester.java resources.AppConfig.java Implemented • Add Qualifying Candidates Get Candidates Report Artifacts Description: Description Implemented File Name application.CandidateReport.java application.DataProvider.java application. Tester.java resources.AppConfig-java resources.LogConfig.java resources.configuration.properties resources.log4j2.xml application.Candidate.java application. Validator.java application Application.java test.ApplicationTest.java To be implemented (Incomplete file is given) Tester: The Tester class is used as an interface between the system and the user to get the inputs and display the output. For all the requirements we have provided the populated objects or variables with hardcoded values. You may need to change the values to verify different scenarios. The code to invoke the Application class methods and to di play the appropriate output is already provided. Notes: Uncomment the commented code in the Tester and DataProvider classes after the required bean classes have been implemented Exception messages should not be hardcoded and should be read from the properties file in the Tester Module 1: Add Qualifying Candidates Input: Candidate details Description: This module will be used to validate and add the candidate details. Valid Input: For valid candidate details: Name Country Date of Birth Citizen ID Eye Power Height Weight Hobbs USA 16th September, 1980 US-674875-H-0891 0.5 1.98 110 The output should be as shown below: Candidate successfully taken into the Defense Squad Invalid Inputs: ge Candidate successfully taken into the Defense Squad Invalid Inputs: • For invalid name “Crime Master Gogo 99”, output should be: Candidate’s name is mandatory and can have only alphabets, with maximum three words • For invalid date of birth “20-Jun-1972”, output should be: Disqualified due to unsuitable age. Allowed range: 16 to 10 years • For invalid citizen ID “BA-333333-CMG-1980″, output should be: Incorrect CitizenID, it should follow the proper format • For invalid eye power”-1.5″ D, output should be: Disqualified due to excessive eye power. Allowed range: -1.0 to +1.9 D • For invalid height”-1.7″ mor invalid weight “0” kg, output should be: Height or weight cannot be negative or zero e usage • For invalid height”-1.7″ m or invalid weight “O” kg, output should be: Height or weight cannot be negative or zero • For invalid BMI when height is “1.7″ m and weight is “200” kg, output should be: Disqualified due to suitable BMI. Allowed range: 15.0 to 29.99 Module 2: Get Candidates Report Input: Squad name Description: This module will be used to generate a report of candidates in a given squad. Valid Input: For valid squad “Field Squad”, output should be: Citizen ID Name BMI US-180143-JM-6791 EN-120478-FM-1891 IN-138652-DLS-4891 John McClane Frank Martin Devi Lal Singh 22.44 20.58 22.29 Invalid Input: For invalid squad “Unreal Squad”, output should be: No candidates found for the given squad Bean Classes: Objects of these classes are used to transfer values between the different layers of the annlication. You need to co thom wharovar annlicable usage Objects of these classes are used to transfer values between the different layers of the application. You need to use them wherever applicable. Candidate (To be implemented) application.Candidate name: String country: String citizenld: String dob: LocalDate application.Candidate o name: String – country: String citizenld: String u dob: LocalDate • heightWeight: Map<String, Float o eyePower: Float o squad: String • getName(): String .setName(name: String): void getCountry: String setCountry(country: String): void .getCitizenld(): String .setCitizenld(citizenld: String): void • getDob: LocalDate setDob(dob: LocalDate): void • getHeightWeight(): Map<String, Float> .setHeightWeight(heightWeight: Map<String, Float>); void .getEye Power0: Float .setEyePower(eyePower: Float): void getSquad(): String setSquad(squad: String): void Note: The height Weight map will have two entries, height (key: “height”) and weight (key: “weight”). Candidate Report (Implemented) application. CandidateReport o name: String CandidateReport (Implemented) application.CandidateReport o name: String • citizenld: String obmic Float squad: String .getName(): String .setName(name: String): void .getCitizenldo: String setCitizenld(citizenld: String): void .getBmio: Float .setBmi(bmi: Float): void .getSquad(): String setSquad(squad: String): void Validator: application. Validator application. Validator • validate(candidate Candidate): void .isValidName(name: String): Boolean .isValidAge(dob: LocalDate): Boolean • isValid CitizenId(candidate Candidate): Boolean isValidEyePower(eyePower: Float): Boolean .isValidHeightAndWeight(heightWeight: Map<String, Float>): Boolean validate(Candidate candidate) This method will receive a Candidate object. It should call the respective validator methods (described below) to validate the candidate’s values, and throw exceptions with the corresponding message codes as shown in the table below: Violation For Name Date of Birth Citizen ID Eye Power Height or Weight Message Validator. INVALID NAME Validator.INVALID_AGE Validator.INVALID_CITIZENID Validator.UNFIT_EYE Validator.INVALID HEIGHT OR WEIGHT Log the exceptions, and re-throw them. isValidName(String name) This method validates the received name. • It should NOT be empty or just spaces. Single spaces between words are allowed. It should ONLY have alphabets. It should have a maximum of three words. . Bababa tan age • It should ONLY have alphabets. • It should have a maximum of three words. • If the above conditions are satisfied, return true, otherwise return false. isValidAge{LocalDate dob) • This method validates the received dob. • The candidate’s age at the time of registration should be between 16 and 40 years (both inclusive) • If the above condition is satisfied, return true, otherwise return false. isValid Citizenld(Candidate candidate) • This method validates the citizenld. • It should be of the following format: <<FirstPart>>-<<SecondPart>>-<<Third Part>>-<<FourthPart>> • The First Part should be the first two letters of the candidate’s country in uppercase The SecondPart should be any 6 digit number, where all the digits are NOT same. The Third Part should be the initials (first letters of each word of a name) of the • • The SecondPart should be any 6 digit number, where all the digits are NOT same. The ThirdPart should be the initials (first letters of each word of a name) of the candidate’s name in uppercase. The FourthPart should be the candidate’s birth year in YYYY format in reverse order. If the above conditions are satisfied, return true, otherwise return false. Example: If country is “Australia”, name is “Van Helsing” and birth year is 1980, then AU-476718-VH-0891 is a valid citizenld. O AU-476718-VH-1980 is an invalid citizenld O AU-476718-vh-0891 is an invalid citizenld isValidEyePowerFloat eyePower) This method validates the eyePower. The candidate’s eye power should be in the range -1.0 to +1.0 diopter, both inclusive. • If the above condition is satisfied, return true, otherwise return false. isValid HeightAnd Weight(Map<String, Float> heightWeight) This method validates the height and weight • The candidate’s height and weight should NOT be negative or zero. (Hint: Height and weight are the two entries in the map) If the above condition is satisfied, return true, otherwise return false. Application: application. Application addCandidate(candidate: Candidate): String calculateBMI(heightWeight: Map<String, Float>): Float getCandidatesReport(squad: String): List<CandidateReport .getCandidatesReport(squad: String): List<CandidateReport> addCandidate(Candidate candidate) • This method will receive a Candidate object. It should check the validity of the candidate’s details, calculate BMI, allot squad, and send the object to the DataProvider for storage. It should validate the candidate’s details using the validate() method of the Validator class. Calculate the BMI of the candidate using the calculateBMI() method of the Application class. • Validate the BMI and allot (set) squad to the candidate according to the following conditions: • If BMI < 15.0 or BMI >= 30.0, then throw an exception with the message “Application.UNFIT_BMI”. If BMI >= 15.0 and BMI < 18.5, allot “Hover Squad”. . If BMI >= 18.5 and BMI < 25.0, allot “Field Squad”. IRMI»- 25 and RM20 lat “Dalane C • If BMI >= 25.0 and BMI < 30.0, allot “Defense Squad”. • Invoke addCandidate() method of the DataProvider to save the candidate object, which in turn returns the squad name as a String. • Return the same String. • Use try catch block to log the exceptions, and re-throw them. Log only the application exceptions. calculateBMI(Map<String, Float height Weight) • This method calculates and returns the BMI using the following formula: BMI = W/HP Where, W is the weight in kilograms, and His the height in meters. (Hint: Height and weight are the two entries in the map) getCandidatesReport(String squad) • This method will receive the squad name for which a report of all the candidates has to be generated. • It should invoke the getCandidatesReport() method of the DataProvider to retrieve a List<Candidate> Filter the above list, and populate a List<Candidate Report> only for those candidates who belong to the given squad. (Hint: Use calculate BMI() method of Application to set the BMI for each Candidate Report object.) If the final List<CandidateReport> is empty, throw an exception with the message “Application.NO_CANDIDATES_FOUND”, else return the list. • Use try-catch block to log the exceptions, and re-throw them. Log only the application exceptions. Use try catch block to log the exceptions, and re-throw them. Log only the application exceptions. DataProvider: application.DataProvider addCandidate(candidate: Candidate): String getCandidatesReport(): List<Candidate> addCandidate(Candidate candidate) • This method receives a Candidate object and returns the candidate’s squad. getCandidates Report() • This method returns a List<Candidate> with the required details. wide usage • This method returns a List<Candidate with the required details. JUnit Test Cases: Implement the following test cases for testing the methods of Application: No. Test Case Name | narne country dob citizenld eyePower addCandidateInvalidage height Weight name country dob citizenld eyePower Values Byomkesh Bakshy India 23-Jun-1924 IN-472829-BB-4291 0.0 height: 1.78 weight : 66.5 Byomkesh Bakshy India 23-Jun-1988 IN-472829-BB-1988 0.0 height: 1.78 weight: 66.5 Byomkesh Bakshy India 23-Jun-1988 IN-472829-BB-8891 0.0 height: 1.78 weight : 120.0 addCandidatelnvalidCitizenld height Weight name country dob citizenld eyePower addCandidateUnfitBMI heightWeight Show transcribed image text usage Problem Description Hi, this is Steve from the year 2121. No programmer is known to be alive today. FCorp Rescue Organization has sent me back in time with a special task for you. The Genetic Modification experiment on humans has failed, and these modified humans are causing disruption and damage everywhere on earth. Worldwide, FCorp is recruiting people to gain control over this chaos. Volunteering candidates need to register themselves. Medical fitness is a mandate. They will be allotted one of the three squads (Field, Hover and Defense) based on their BMI (Body Mass Index) values. An application is urgently required to ease the recruitment process. A reporting module is also expected, using which FCorp can get the details of the candidates in a particular squad. Our analysts have already arranged the requirements and design, which are given below. I have only 3 hours before the time portal closes. The future is in your hands, Hurry! It includes the following two modules: • Add Qualifying Candidates • Get Candidates Report Artifacts Description: Description File Name application. Candidate Report.java application.DataProvider.java application. Tester.java resources.AppConfig.java Implemented
• Add Qualifying Candidates Get Candidates Report Artifacts Description: Description Implemented File Name application.CandidateReport.java application.DataProvider.java application. Tester.java resources.AppConfig-java resources.LogConfig.java resources.configuration.properties resources.log4j2.xml application.Candidate.java application. Validator.java application Application.java test.ApplicationTest.java To be implemented (Incomplete file is given) Tester: The Tester class is used as an interface between the system and the user to get the inputs and display the output. For all the requirements we have provided the populated objects or variables with hardcoded values. You may need to change the values to verify different
scenarios. The code to invoke the Application class methods and to di play the appropriate output is already provided. Notes: Uncomment the commented code in the Tester and DataProvider classes after the required bean classes have been implemented Exception messages should not be hardcoded and should be read from the properties file in the Tester Module 1: Add Qualifying Candidates Input: Candidate details Description: This module will be used to validate and add the candidate details. Valid Input: For valid candidate details: Name Country Date of Birth Citizen ID Eye Power Height Weight Hobbs USA 16th September, 1980 US-674875-H-0891 0.5 1.98 110 The output should be as shown below: Candidate successfully taken into the Defense Squad Invalid Inputs:
ge Candidate successfully taken into the Defense Squad Invalid Inputs: • For invalid name “Crime Master Gogo 99”, output should be: Candidate’s name is mandatory and can have only alphabets, with maximum three words • For invalid date of birth “20-Jun-1972”, output should be: Disqualified due to unsuitable age. Allowed range: 16 to 10 years • For invalid citizen ID “BA-333333-CMG-1980″, output should be: Incorrect CitizenID, it should follow the proper format • For invalid eye power”-1.5″ D, output should be: Disqualified due to excessive eye power. Allowed range: -1.0 to +1.9 D • For invalid height”-1.7″ mor invalid weight “0” kg, output should be: Height or weight cannot be negative or zero
e usage • For invalid height”-1.7″ m or invalid weight “O” kg, output should be: Height or weight cannot be negative or zero • For invalid BMI when height is “1.7″ m and weight is “200” kg, output should be: Disqualified due to suitable BMI. Allowed range: 15.0 to 29.99 Module 2: Get Candidates Report Input: Squad name Description: This module will be used to generate a report of candidates in a given squad. Valid Input: For valid squad “Field Squad”, output should be: Citizen ID Name BMI US-180143-JM-6791 EN-120478-FM-1891 IN-138652-DLS-4891 John McClane Frank Martin Devi Lal Singh 22.44 20.58 22.29 Invalid Input: For invalid squad “Unreal Squad”, output should be: No candidates found for the given squad Bean Classes: Objects of these classes are used to transfer values between the different layers of the annlication. You need to co thom wharovar annlicable
usage Objects of these classes are used to transfer values between the different layers of the application. You need to use them wherever applicable. Candidate (To be implemented) application.Candidate name: String country: String citizenld: String dob: LocalDate
application.Candidate o name: String – country: String citizenld: String u dob: LocalDate • heightWeight: Map

Expert Answer


Answer to infosys university wants to automate the process of registering students to different course. the course registration cl…

OR