[solved]-Tasks 1 Creat According Tits Uml Class Diggram Thare Teocomtructors B Net Nul Constructor Q39085223


Tasks 1. Creat according to tits UML Class Diggram Thare will be teo.comtructors b There will net be a nul constructor. from PA02 so that they meet the revised 2. hea in the Ld closs dinaroms .Add the required validetion code as explained in the UML diagrams. NOTE: for some , Throw a PolicvExcention when an obiert cannot be successfully instantiated. Catch exceptions triggered validation failures in set methods, then chain the exception. in the new, aind ascoaion obiect lastaatiate the w heined ercention ebiect es e PolicyException type. d Mo .erciss toString method to penvide boris nolicy Information . Use a StringBuilder object to build the output. Requirements: Policy 1. Revise Policy according to the UML Class Diagram provided and these instructions the String represents, Do not complete instantiation of the Policy obiert if the validation fails. Do not complete instantiotion of the Policy object if either owner of insured name is null or all 2. The notey rumber must hove a specific structure 4. The first two characters mus e alphobetic Ino numbers, special characters, or a. b. The remaining portion of the policy number must consist of exactly 5 digits. eieEvcantion, The message used to instantiate 5. he exception a v ohiect must include all values offered to the comtructor. Auto 1. Modify the subclass Auto according to the UML requirements and the Instructions provided here and less then or equal to 2021. I rquirement a. It must be 17 characters long. Validate this using a String method. It may not contain special dharacters or white spoce. Valdate for this with a reqular this with a regular expression xpression. It cannot contain the letter I, O, or Q. Valdate c NOTE: Items b through d may be done using a single regular expression. Deductible value must l one of the following 250, 500, 750, or 1000. No other values are 4. gcceptable. yEception. The messoge used to instantiatet e exceation 6. The toString method will be updated to meet the following requirements For the fin portion of the output, call the superclass toString mathod. a StringBuilder objec e output HomeOwners 1 Modify the subclass Home0wners accordina to the UML reguirements and instructions as pevided. 2. Property type must be digit between 1 and 5, inclusive. If the offered value is out of range, assign The insured value of the contents must be areator than 0 and less than or caual to 1.000,000, Do ot complete instontiotion of the HomeOwnerrs obiect if the validation fails 10 % , inclusive. Do not complete instantiation of the 4- fa validation fails, throw a PolicyException. The messoge used 5. instarticte exception The tosteine method willL be undated to meet the following requirements: For the first portion b. Use a StringBuilder obiect to build the outout e superclass toString method the output, call PolicyException UML requirements as provided. Wrhe code for the subclass PolicyException according Custom e class Custoner as descrbed in the UML Class Diagram uce 2. Valdated customer Id f length of String (7 digits] and the integer value the String . De not complete instantiation of the Customer object if the validation fas Oo not complete instantiation of the Customer object if the validation foik 4. Validate first name to ensure existence -that is, the String may not be null or blank. Do not Voldate the tax identifler for length and type of choracters (9 dights) Do not complete instantiation of the Customer object if the validation fails. used to imtontiote the exception object must include all volues offered to the constructor. CustomerException Write code for the subclass CustonerException according to the UML requirements as provided. Notes on Exceptions ehained and possed un the nail stock to the test bomess, Comolete and meaninaful messones should be provided for. any/every error. Except for the requirement to Indude and wording of exception messoges is up to the team. values offered at the constructor level, the form Provided Code Test ExceptionHandling.java ontoined in coch test cose will (shold noss validations These DO NOT CONSTITUTE A COMPLETE TEST of vour data velidations or excention handlina. Yau will want to add test cases to fullv exercise all the logk invol Poky irat eswigian teern a a wdratiem i H or a-wt .. Puicy st Oreratas treter iaee Cartoes ot la ceme Istee aut-ww wttr Cutomerpen d rksm e8t tes Show transcribed image text Tasks 1. Creat according to tits UML Class Diggram Thare will be teo.comtructors b There will net be a nul constructor. from PA02 so that they meet the revised 2. hea in the Ld closs dinaroms .Add the required validetion code as explained in the UML diagrams. NOTE: for some , Throw a PolicvExcention when an obiert cannot be successfully instantiated. Catch exceptions triggered validation failures in set methods, then chain the exception. in the new, aind ascoaion obiect lastaatiate the w heined ercention ebiect es e PolicyException type. d Mo .erciss toString method to penvide boris nolicy Information . Use a StringBuilder object to build the output. Requirements: Policy 1. Revise Policy according to the UML Class Diagram provided and these instructions the String represents, Do not complete instantiation of the Policy obiert if the validation fails. Do not complete instantiotion of the Policy object if either owner of insured name is null or all 2. The notey rumber must hove a specific structure 4. The first two characters mus e alphobetic Ino numbers, special characters, or a. b. The remaining portion of the policy number must consist of exactly 5 digits. eieEvcantion, The message used to instantiate 5. he exception a v ohiect must include all values offered to the comtructor. Auto 1. Modify the subclass Auto according to the UML requirements and the Instructions provided here and less then or equal to 2021. I rquirement a. It must be 17 characters long. Validate this using a String method. It may not contain special dharacters or white spoce. Valdate for this with a reqular this with a regular expression xpression. It cannot contain the letter I, O, or Q. Valdate c NOTE: Items b through d may be done using a single regular expression. Deductible value must l one of the following 250, 500, 750, or 1000. No other values are 4. gcceptable. yEception. The messoge used to instantiatet e exceation 6. The toString method will be updated to meet the following requirements For the fin portion of the output, call the superclass toString mathod. a StringBuilder objec e output HomeOwners 1 Modify the subclass Home0wners accordina to the UML reguirements and instructions as pevided. 2. Property type must be digit between 1 and 5, inclusive. If the offered value is out of range, assign The insured value of the contents must be areator than 0 and less than or caual to 1.000,000, Do ot complete instontiotion of the HomeOwnerrs obiect if the validation fails 10 % , inclusive. Do not complete instantiation of the 4- fa validation fails, throw a PolicyException. The messoge used 5. instarticte exception The tosteine method willL be undated to meet the following requirements: For the first portion b. Use a StringBuilder obiect to build the outout e superclass toString method the output, call PolicyException UML requirements as provided. Wrhe code for the subclass PolicyException according Custom e class Custoner as descrbed in the UML Class Diagram uce 2. Valdated customer Id f length of String (7 digits] and the integer value the String . De not complete instantiation of the Customer object if the validation fas Oo not complete instantiation of the Customer object if the validation foik 4. Validate first name to ensure existence -that is, the String may not be null or blank. Do not Voldate the tax identifler for length and type of choracters (9 dights) Do not complete instantiation of the Customer object if the validation fails. used to imtontiote the exception object must include all volues offered to the constructor. CustomerException Write code for the subclass CustonerException according to the UML requirements as provided. Notes on Exceptions ehained and possed un the nail stock to the test bomess, Comolete and meaninaful messones should be provided for. any/every error. Except for the requirement to Indude and wording of exception messoges is up to the team. values offered at the constructor level, the form Provided Code Test ExceptionHandling.java ontoined in coch test cose will (shold noss validations These DO NOT CONSTITUTE A COMPLETE TEST of vour data velidations or excention handlina. Yau will want to add test cases to fullv exercise all the logk invol
Poky irat eswigian teern a a wdratiem i H or a-wt .. Puicy st Oreratas treter iaee Cartoes ot la ceme Istee aut-ww wttr Cutomerpen d rksm e8t tes
Expert Answer
Answer to Tasks 1. Creat according to tits UML Class Diggram Thare will be teo.comtructors b There will net be a nul constructor. … . . .
OR

