To improve readability, use white
text on a dark green background but <span>the darker text on a lighter background
was rated more readable than lighter text on dark backgrounds according to
survey in every color combination. Example, red text on white background is
more readable than white text on red background.</span>
Answer:
Hello attached is the Java program written to solve the problem
The Pet.java and Dog.java files are unaltered
Explanation:
The input and output codes are attached as well i.e the second image is the input while the third image is the output code