Answer to Question #243870 in Programming & Computer Science for Gulshan

Question #243870

Write pseudocode, design flow chart and Java program using meaningful variable names, match logic specificed as in pseudocode and flow chart. Collect client information (Last name, first name, middle name (appear in one line) house/unit number, street name, type (appear in one line, city (by itself) & age (by itself) . Initial of first name with full stop, initial of middle name with full stop. Age brackets: 20 or under

21-35

36-70

71 or over


1
Expert's answer
2021-09-28T15:32:22-0400
Pseudocode
Start		
        Declare variables lastName, firstName, middleName, 
        houseUnitNumber, streetName,city,age
	Read Last name
	Read first name
	Read middle name
	Read house/unit number
	Read street name
	Read city
	Read age
Stop


Java code
import java.util.Scanner;


public class Main {


	public static void main(String[] args) {


		Scanner input = new Scanner(System.in);


		System.out.print("Enter Last name: ");
		String lastName = input.nextLine();
		System.out.print("Enter first name: ");
		String firstName = input.nextLine();
		System.out.print("Enter middle name: ");
		String middleName = input.nextLine();
		System.out.print("Enter house/unit number: ");
		String houseUnitNumber = input.nextLine();
		System.out.print("Enter street name: ");
		String streetName = input.nextLine();
		System.out.print("Enter city: ");
		String city = input.nextLine();
		System.out.print("Enter age: ");
		int age = input.nextInt();


		input.close();
	}


}




Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS