Birthdaydate.java import java.util.Scanner; public class Birthdaydate { public static void main(String[] args) { //Declaring variables char ch,ch1,ch2,ch3,ch4,ch5; //Declaring each card as an 2-Dimensional Array int card1[][]={{1,3,5,7},{9,11,13,15},{17,19,21,23},{25,27,29,31}}; int card2[][]={{2,3,6,7},{10,11,14,15},{18,19,22,23},{26,27,30,31}}; int card3[][]={{4,5,6,7},{12,13,14,15},{20,21,22,23},{28,29,30,31}}; int card4[][]={{8,9,10,11},{12,13,14,15},{24,25,26,27},{28,29,30,31}}; int card5[][]={{16,17,18,19},{20,21,22,23},{24,25,26,27},{28,29,30,31}}; //Scanner Object is used to get the inputs entered by the user Scanner sc = new Scanner(System.in); //This loop continue to execute until user enters \'Y\' or \'y\' do { //Declaring variable int sum=0; //Displaying card1 using nested for loop System.out.println(\":: Card1 ::\"); for(int i=0;i<4;i++) { for(int j=0;j<4;j++) { System.out.printf(\"%3d\",card1[i][j]); } System.out.println(\" \"); } //Prompting whether the day of birth is having in card1 or not. System.out.print(\"Do card#1 is having Your Birthday (Y/N):\"); ch1 = sc.next(\".\").charAt(0); //If the day is in card 1,add the first row first column element to sum if(ch1==\'Y\' || ch1==\'y\') sum+=card1[0][0]; //Displaying card2 using nested for loop System.out.println(\":: Card2 ::\"); for(int i=0;i<4;i++) { for(int j=0;j<4;j++) { System.out.printf(\"%3d\",card2[i][j]); } System.out.println(\" \"); } //Prompting whether the day of birth is having in card2 or not. System.out.print(\"Do card#2 is having Your Birthday (Y/N):\"); ch2 = sc.next(\".\").charAt(0); //If the day is in card 2,add the first row first column element to sum if(ch2==\'Y\' || ch2==\'y\') sum+=card2[0][0]; //Displaying card3 using nested for loop System.out.println(\":: Card3 ::\"); for(int i=0;i<4;i++) { for(int j=0;j<4;j++) { System.out.printf(\"%3d\",card3[i][j]); } System.out.println(\" \"); } //Prompting whether the day of birth is having in card3 or not. System.out.print(\"Do card#3 is having Your Birthday (Y/N):\"); ch3 = sc.next(\".\").charAt(0); //If the day is in card 3,add the first row first column element to sum if(ch3==\'Y\' || ch3==\'y\') sum+=card3[0][0]; //Displaying card4 using nested for loop System.out.println(\":: Card4 ::\"); for(int i=0;i<4;i++) { for(int j=0;j<4;j++) { System.out.printf(\"%3d\",card4[i][j]); } System.out.println(\" \"); } //Prompting whether the day of birth is having in card4 or not. System.out.print(\"Do card#4 is having Your Birthday (Y/N):\"); ch4 = sc.next(\".\").charAt(0); //If the day is in card 4,add the first row first column element to sum if(ch4==\'Y\' || ch4==\'y\') sum+=card4[0][0]; //Displaying card5 using nested for loop System.out.println(\":: Card5 ::\"); for(int i=0;i<4;i++) { for(int j=0;j<4;j++) { System.out.printf(\"%3d\",card5[i][j]); } System.out.println(\" \"); } //Prompting whether the day of birth is having in card5 or not. System.out.print(\"Do card#5 is having Your Birthday (Y/N):\"); ch5 = sc.next.