Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Names and Places The goal in this exercise is to develop a program that will print out a list of student names together with other
Names and Places The goal in this exercise is to develop a program that will print out a list of student names together with other information for each. The tab character (an escape sequence) is helpful in getting the list to line up nicely. A program with only two names is in the file Names java Names.java Prints a list of student names with their hometowns and intended major public class Names main prints the list public static void main (StringI1 args) System.out.println System.out.println tName\tltHometown) System.out.println ttht) System.out.println tsallyttRoanoke) System.out.println tAlexander\tWashington" System.out.println Save Names java to your directory. Compile and run it to see how it works Modify the program so that your name and hometown and the name and hometown of at least two classmates sitting near you in lab also are printed. Save, compile and run the program. Make sure the columns line up. 2. 3. Modify the program to add a third column with the intended major of each person (assume Sally's major is Computer Science and Alexander's major is Math). Be sure to add a label at the top of the third column and be sure everything is lined up (use tab characters!)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started