validateNIC(gender, birthday) {

        if(!this.isValidNICProvided) {
            console.log("A valid NIC should be provided")
            return
        }

        const cBirthday = this.getBirthDay()
        const cGender = this.getGender()

        if(!birthday.hasOwnProperty("year") || !birthday.hasOwnProperty("month") || !birthday.hasOwnProperty("day")) {
            return {
                "nic": this.nic,
                "error": "provided birthday object is missing required keys"
            }
        }

        if(cGender.gender.toUpperCase() != gender.toUpperCase()) {
            return {
                "nic": this.nic,
                "error": "Gender does not match"
            }
        }

        if(birthday.year!= cBirthday.birthday.year || birthday.month != cBirthday.birthday.month || birthday.day != cBirthday.birthday.day) {
            return {
                "nic": this.nic,
                "error": "Birthday does not match"
            }
        }


        return {
            "nic": this.nic,
            "result": "Provided information matched"
        }
        
    }
/**
     * The method is used to validate and provide a response as a JSON object with 
     * checking the provided birthday information along with the calculated information and
     * checking the provided gender with the calculated gender
     * 
     * @param {Gender to be validated as String} gender 
     * @param {Birthday to be validated as a JSON object with keys [year,month,day]} birthday 
     * 
     * The result will be provided as a JSON object
     * 
     */
The method is used to validate and provide a response as a JSON object with
checking the provided birthday information along with the calculated information and
checking the provided gender with the calculated gender

@param {Gender to be validated as String} gender
@param {Birthday to be validated as a JSON object with keys [year,month,day]} birthday

The result will be provided as a JSON object
The method is used to validate and provide a response as a JSON object with checking the provided birthday information along with the calculated information and checking the provided gender with the calculated gender @param { Gender to be validated as String } gender @param { Birthday to be validated as a JSON object with keys [ year month day ] } birthday The result will be provided as a JSON object
validateNIC(gender, birthday) {
        if(!this.isValidNICProvided) {
            console.log("A valid NIC should be provided")
            return
        }
        const cBirthday = this.getBirthDay()
        const cGender = this.getGender()
        if(!birthday.hasOwnProperty("year") || !birthday.hasOwnProperty("month") || !birthday.hasOwnProperty("day")) {
            return {
                "nic": this.nic,
                "error": "provided birthday object is missing required keys"
            }
        }
        if(cGender.gender.toUpperCase() != gender.toUpperCase()) {
            return {
                "nic": this.nic,
                "error": "Gender does not match"
            }
        }
        if(birthday.year!= cBirthday.birthday.year || birthday.month != cBirthday.birthday.month || birthday.day != cBirthday.birthday.day) {
            return {
                "nic": this.nic,
                "error": "Birthday does not match"
            }
        }
        return {
            "nic": this.nic,
            "result": "Provided information matched"
        }
    }
validateNIC ( gender , birthday ) { if ( ! this . isValidNICProvided ) { console . log ( "A valid NIC should be provided" ) return } const cBirthday = this . getBirthDay ( ) const cGender = this . getGender ( ) if ( ! birthday . hasOwnProperty ( "year" ) || ! birthday . hasOwnProperty ( "month" ) || ! birthday . hasOwnProperty ( "day" ) ) { return { "nic" : this . nic , "error" : "provided birthday object is missing required keys" } } if ( cGender . gender . toUpperCase ( ) != gender . toUpperCase ( ) ) { return { "nic" : this . nic , "error" : "Gender does not match" } } if ( birthday . year != cBirthday . birthday . year || birthday . month != cBirthday . birthday . month || birthday . day != cBirthday . birthday . day ) { return { "nic" : this . nic , "error" : "Birthday does not match" } } return { "nic" : this . nic , "result" : "Provided information matched" } }
The method is used to validate and provide a response as a JSON object with
 checking the provided birthday information along with the calculated information and
 checking the provided gender with the calculated gender
The method is used to validate and provide a response as a JSON object with checking the provided birthday information along with the calculated information and checking the provided gender with the calculated gender