The document describes several Java programs that use control flow statements like if/else, case statements, and input/output. The programs determine voter eligibility, identify vowels/consonants, get the day of the week from a number, calculate a student's grade or a parallelogram's area from user input dimensions, and print out a user's name or personal details.
The document describes several Java programs that use control flow statements like if/else, case statements, and input/output. The programs determine voter eligibility, identify vowels/consonants, get the day of the week from a number, calculate a student's grade or a parallelogram's area from user input dimensions, and print out a user's name or personal details.
The document describes several Java programs that use control flow statements like if/else, case statements, and input/output. The programs determine voter eligibility, identify vowels/consonants, get the day of the week from a number, calculate a student's grade or a parallelogram's area from user input dimensions, and print out a user's name or personal details.
to determine whether a user is eligible to vote or not.
The program uses multiple if else
statements to determine whether an uppercase or lowercase letter is a vowel or a consonant.
The program uses case statement to
determine the days of the week using a number input. The program uses case statement to determine the final grade of a student.
The program asks for user’s name as
an input using java.util.Scanner. Then it prints out the given input as username.
The program uses java.util.Scanner to
ask for user’s personal information and prints it out all at once. The program uses java.util.Scanner to ask for the dimensions (base and height) of a parallelogram. It then uses these values to calculate for a that certain parallelogram’s area. It displays the computed area inside an actual parallelogram made of asterisks together with the user’s input of its dimensions.