Declare a global boolean value in the subclass


Problem

Instead of using displayValidity() method as i have it, I have to do the following:

A. Declare a global boolean value in the subclass

B. Make a setValidity() method that is called to set the boolean value

C. Make displayValidity a get method, getValidity(). It should only return the boolean value and that is it

D. In the condition checking methods, its already set to update. i have to use if/else blocks at the end. In the if portion, call the setValidity method and set that boolean value to true THEN call the next method down the line. If the condition checks false, use the else portion to call the setValidity() method to false.

E. I have to Move logic that reports good or bad card to the main method. i have to use an if/else block again AFTER I call the getValidity() method. If true, output a good card, else if false, output a bad card result.

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: Declare a global boolean value in the subclass
Reference No:- TGS03261657

Expected delivery within 24 Hours