Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I tried to solve it and this is what I did: CARE FILE public abstract class Soins { public static final double [] TABLEAU_RECLAMATION =

image text in transcribedimage text in transcribed

image text in transcribedimage text in transcribedimage text in transcribed

I tried to solve it and this is what I did:

CARE FILE

public abstract class Soins { public static final double [] TABLEAU_RECLAMATION = {234.00 , 90.00 , 125.00}; public static final char contratA = 'A'; public static final char contratB = 'B'; public static final char contratC = 'C'; public static final char contratD = 'D'; private static int numSoin; private static char contrat; public Soins(int NumSoin,char contrat){ this.numSoin = NumSoin; this.contrat = contrat; } /** * Cette methode retourne le numero de soin * @return numSoin le numero de soin. * */ public int getNumSoin(){ return numSoin; } /** * Cette methode retourne le contrat * @return contrat le contrat. * */ public int getContrat(){ return contrat; } public boolean contratA(){ return(getContrat() == contratA); } public boolean contratB(){ return(getContrat() == contratB); } public boolean contratC(){ return(getContrat() == contratC); } public boolean contratD(){ return(getContrat() == contratD); } /** * Cette methode vrifie si le numro de soin est valide * @return une variable boolean. * */ public abstract boolean numSoinValide(); public abstract double calculerRemboursementA(); public abstract double calculerRemboursementB(); public abstract double calculerRemboursementC(); public abstract double calculerRemboursementD(); }

MASSOTHERAPIE FILE

public class Massotherapie extends Soins{ // Dclaration des constantes /**************************************************************************/ public static final int NUM_SOINS_MASO = 0; public Massotherapie(int NumSoin,char contrat) { super(NumSoin,contrat); } @Override public boolean numSoinValide() { return(this.getNumSoin() == NUM_SOINS_MASO); } @Override public double calculerRemboursementA() { double remboursement = 0.00; if(this.contratA()){ for(int i = 0 ; i = 40) { remboursement = 40; } } } return remboursement; } @Override public double calculerRemboursementC() { double remboursement = 0.00; if(this.contratC()){ for(int i = 0 ; i = 85) { remboursement = 85; } } } return remboursement; } }

CHIROPRATIC FILE

public class Chiropratie extends Soins{ //Numero de soin de chiropratie public static final int NUM_SOINS_CHIRO = 500; public Chiropratie(int numSoins,char contrat){ super(numSoins,contrat); } /** * Cette methode vrifie si le numro de soin * de chiropratie est valide * @return une variable boolean. * */ public boolean numSoinValide() { return (this.getNumSoin() == NUM_SOINS_CHIRO); } @Override public double calculerRemboursementA() { double remboursement = 0.00; if(this.contratA()){ for(int i = 0 ; i = 50) { remboursement = 50; } } } return remboursement; } @Override public double calculerRemboursementC() { double remboursement = 0.00; if(this.contratC()){ for(int i = 0 ; i = 75) { remboursement = 75; } } } return remboursement; } }
Initial request Your client asks to get these functionalities for the 21st February 2021, before 23h55. The delivery date is not negotiable. The application that should be made is a software that will calculate the refunds of the claims of health insurance. In this field, the insurance contracts have a lot of clauses, exceptions and particularities. Our client has the same case (exceptions...). He needs help to facilitate accessing the contracts and organizing the rules to help his business grow. The software won't have a user interface since it will be used on a web application. So, the contract only consists only on developing the "back-end" of the application. Functionalities The entered file in JSON format will look like this: "Client":"100323", "contrat": "A" "mis": "2021-01", "reclamations": "scin": 100, "date":"2021-01-11", "montant": "234.00%" "sin": 200, "date":"2021-01-13", "montant": "90.00$" "sain": 334, "date":"2021-01-23", "montant": "125.005" 1 The results file generated by the software should look like this: "client":"100323", "mos": "2021-01", remboursement": "on": 100, "date":"2021-01-11". montant": "58.500" Taoin": 200, "date":"2021-01-13", "montant":"22.50" "On": 334, "date":2021-01-23", "montant": "0.000" The program should consider the input file as an argument when executing the software in a console (main parameter). The output file should also be specified in the console: java -jar Refund.jar input file.json refunds.json There are 4 types of different contracts: A, B, C, D. Here are the different categories of care depending on their number and the refunds for each contract type: B D Care Care Category A Number 0 Massothrapie 25% 100 Ostopathie 25% 200 Psychologie individuelle 25% [300..399) Soins dentaires 0% 400 Naturopathic, acuponcture 0% 500 Chiropratic 25% 600 Physiotherapie 40% 700 Orthophonie, ergothrapie 0% 50% max 405 90% 50% max 505 90% 100% max 705 90% 50% 90% 0% 90% 50% max 505 90% 100% 90% 70% 90% 100% max 855 100% max 755 100% max 1005 100% 100% max 65S 100% max 755 100% max 1005 100% max 90S Here are some other validations to do on the input data: The client number should be at least 6 numbers, no character other than numbers shouldn't be present in the client number. The contract should be one from the 4 following letters: A, B, C, D. The letter should be capitalized. The app will receive all the reclamations of a client for a month in the same JSON document, the month is specified in the month square that will look something like this (YYYY-MM). You should verify that each claim is done in the month that we are dealing with. For example, a care done February 2nd can't considered in a paper from January 2021. The dollar symbol ($) should always be present at the end of an amount. If the amount entered contains a point "." Or a coma," to separate dollars from cents, it should be supported. So, it should work if the entered amount contains a point or a coma. However, the output file should only contain points to separate dollars and cents. The care number should be valid according to the table above. The input data should respect all these rules to be valid. If the input data are not valid, the app should generate the following output file: { "message" : "Donnes invalides" } Technological constraints The software should be developed using the programming language Java (JDK11 or plus). You must use Intelli). JUnits will be used as a framework for test. The input and output files should be JSON files. The references should be in a GIT repository under GitLab. The input and output files should be in UTF-8. Initial request Your client asks to get these functionalities for the 21st February 2021, before 23h55. The delivery date is not negotiable. The application that should be made is a software that will calculate the refunds of the claims of health insurance. In this field, the insurance contracts have a lot of clauses, exceptions and particularities. Our client has the same case (exceptions...). He needs help to facilitate accessing the contracts and organizing the rules to help his business grow. The software won't have a user interface since it will be used on a web application. So, the contract only consists only on developing the "back-end" of the application. Functionalities The entered file in JSON format will look like this: "Client":"100323", "contrat": "A" "mis": "2021-01", "reclamations": "scin": 100, "date":"2021-01-11", "montant": "234.00%" "sin": 200, "date":"2021-01-13", "montant": "90.00$" "sain": 334, "date":"2021-01-23", "montant": "125.005" 1 The results file generated by the software should look like this: "client":"100323", "mos": "2021-01", remboursement": "on": 100, "date":"2021-01-11". montant": "58.500" Taoin": 200, "date":"2021-01-13", "montant":"22.50" "On": 334, "date":2021-01-23", "montant": "0.000" The program should consider the input file as an argument when executing the software in a console (main parameter). The output file should also be specified in the console: java -jar Refund.jar input file.json refunds.json There are 4 types of different contracts: A, B, C, D. Here are the different categories of care depending on their number and the refunds for each contract type: B D Care Care Category A Number 0 Massothrapie 25% 100 Ostopathie 25% 200 Psychologie individuelle 25% [300..399) Soins dentaires 0% 400 Naturopathic, acuponcture 0% 500 Chiropratic 25% 600 Physiotherapie 40% 700 Orthophonie, ergothrapie 0% 50% max 405 90% 50% max 505 90% 100% max 705 90% 50% 90% 0% 90% 50% max 505 90% 100% 90% 70% 90% 100% max 855 100% max 755 100% max 1005 100% 100% max 65S 100% max 755 100% max 1005 100% max 90S Here are some other validations to do on the input data: The client number should be at least 6 numbers, no character other than numbers shouldn't be present in the client number. The contract should be one from the 4 following letters: A, B, C, D. The letter should be capitalized. The app will receive all the reclamations of a client for a month in the same JSON document, the month is specified in the month square that will look something like this (YYYY-MM). You should verify that each claim is done in the month that we are dealing with. For example, a care done February 2nd can't considered in a paper from January 2021. The dollar symbol ($) should always be present at the end of an amount. If the amount entered contains a point "." Or a coma," to separate dollars from cents, it should be supported. So, it should work if the entered amount contains a point or a coma. However, the output file should only contain points to separate dollars and cents. The care number should be valid according to the table above. The input data should respect all these rules to be valid. If the input data are not valid, the app should generate the following output file: { "message" : "Donnes invalides" } Technological constraints The software should be developed using the programming language Java (JDK11 or plus). You must use Intelli). JUnits will be used as a framework for test. The input and output files should be JSON files. The references should be in a GIT repository under GitLab. The input and output files should be in UTF-8

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Flash XML Applications Use AS2 And AS3 To Create Photo Galleries Menus And Databases

Authors: Joachim Schnier

1st Edition

0240809173, 978-0240809175

More Books

Students also viewed these Databases questions