Advertisement
Guest User

Untitled

a guest
Dec 21st, 2014
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.11 KB | None | 0 0
  1. /*
  2.  * To change this license header, choose License Headers in Project Properties.
  3.  * To change this template file, choose Tools | Templates
  4.  * and open the template in the editor.
  5.  */
  6. package QUT.n8592268.Insurance;
  7.  
  8. import javax.jws.WebService;
  9. import javax.jws.WebMethod;
  10. import javax.jws.WebParam;
  11. import javax.ejb.Stateless;
  12.  
  13. /**
  14.  *
  15.  * @author Keiko
  16.  */
  17. @WebService(serviceName = "n8592268_InsuranceWS")
  18. @Stateless()
  19. public class n8592268_InsuranceWS {
  20.  
  21.     /**
  22.      * @param id
  23.      * @param quote
  24.      *
  25.      */
  26.     @WebMethod(operationName = "checkCoverageValue")
  27.     public float checkCoverageValue(
  28.             @WebParam(name = "id") String id,
  29.             @WebParam(name = "quote") float quote) {
  30.  
  31.         final float MAX = 5000f;
  32.         if(quote > MAX){
  33.             return (quote - MAX);
  34.         } else {
  35.             return 0.00f;
  36.         }      
  37.     }
  38.  
  39.     /**
  40.      *
  41.      * @param pid
  42.      *
  43.      */
  44.     @WebMethod(operationName = "checkPolicyIsValid")
  45.     public boolean checkPolicyIsValid(@WebParam(name = "pid") String pid) {
  46.        
  47.         return true;
  48.     }
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement