1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
quester [9]
3 years ago
9

Design and implement an application that reads a sequence of up to 25 pairs of names and postal (ZIP) codes for individuals. Sto

re the data in an object designed to store a first name (string), last name (string), and postal code (integer). Assume each line of input will contain two strings followed by an integer value, each separated by a tab character. Then, after the input has been read in, print the list in an appropriate format to the screen.
Computers and Technology
1 answer:
Vikki [24]3 years ago
3 0

Answer:

Kindly go to the explanation for the answer.

Explanation:

Person.java

public class Person{

private String firstName, lastName;

private int zip;

public Person(String firstName, String lastName, int zip) {

super();

this.firstName = firstName;

this.lastName = lastName;

this.zip = zip;

}

public String toString() {

String line = "\tFirst Name = " + this.firstName + "\n\tLast Name = " + this.lastName;

line += "\n\tZip Code = " + this.zip + "\n";

return line;

}

}

Test.java

import java.util.ArrayList;

import java.util.Scanner;

public class Test{

public static void main(String args[]) {

Scanner in = new Scanner(System.in);

ArrayList<Person> al = new ArrayList<Person>();

for(int i = 0; i < 25; i++) {

System.out.print("Enter person details: ");

String line = in.nextLine();

String words[] = line.split("\t");

String fname = words[0];

String lname = words[1];

int numb = Integer.parseInt(words[2]);

Person p = new Person(fname, lname, numb);

al.add(p);

}

for(int i = 0; i < 25; i++) {

System.out.println("Person " + (i + 1) + ":");

System.out.println(al.get(i));

}

}

}

You might be interested in
Jenna updated her status on a social network regarding her upcoming vacation. What information should Jenna not provide when upd
juin [17]

D. her opinions on social issues

4 0
3 years ago
A talented student wrote a song. Another student posted a video of the song on You Tube, claiming to have written the song. this
Rashid [163]
Cheating , jealousy
8 0
3 years ago
Use the SQL Server Management Studio to complete the following.
scZoUnD [109]
<h3><u>The SQL Server Management Studio program for the given statement: </u></h3>

Select EmployeeId, LastName, FirstName, JobTitle, SalaryWage Into pp_SalaryEmployee from Employee where SalaryWage>70;

Select EmployeeId, LastName, FirstName, JobTitle, SalaryWage Into Pp_HourlyEmoloyee from Employee where SalaryWage<71;

Select * from pp_HourlyEmployee

Select * from pp_SalaryEmployee

Update pp_SalaryEmployee SET SalaryWage=SalaryWage*0.04;

Update Pp_HourlyEmoloyee Set SalaryWage=55+SalaryWage;

Insert into pp_SalaryEmployee values ('181','V','Priya','Teamlead',50000)

Insert into pp_SalaryEmployee Select * from Pp_HourlyEmoloyee ;

Update pp_SalaryEmployee set SalaryWage=SalaryWage*40*52

Select * from Pp_HourlyEmoloyee

Delete from Pp_HourlyEmoloyee

Drop table Pp_HourlyEmoloyee

Drop table Pp_SalaryEmployee

<u>Explanation: </u>

SSMS is abbreviated as SQL Server Management Studio, it is a software application and it is launched with Microsoft SQL Server that is used for managing, configuring, and administering all components within Microsoft SQL Server.  

A main feature of ‘SQL Server Management Studio’ is the Object Explorer, it allows the user to select, browse, and act upon any of the objects within the server.  

These servers are major successor to the ‘Enterprise Manager’ in SQL. The tool includes both graphical tools and script editors which work with components and features of the server.  

It is used to separate ‘Express edition’ that could be freely downloaded, however recent versions of SQL Server Management Studio are fully capable of connecting to ‘SQL Server Express instance’.

6 0
3 years ago
Describe the Order of Operations in Java programming.
cestrela7 [59]

Answer:

It stands for Parentheses, Exponents, Multiplication/Division, Addition/Subtraction. PEMDAS is often expanded to the mnemonic "Please Excuse My Dear Aunt Sally" in schools. Canada and New Zealand use BEDMAS, standing for Brackets, Exponents, Division/Multiplication, Addition/Subtraction.

5 0
3 years ago
Sireus Corp. has availed a cloud-based service. As this service provides hardware and operating systems, Sireus Corp. can easily
photoshop1234 [79]

Answer:

The correct answer is c) PaaS (Platform as a service).

Explanation:

PaaS advantages

• is a cloud computing offering that provides users with a cloud environment in which they can develop, manage and deliver applications.  

• Users, in addition to storage and other computing resources, can use a set of prebuilt tools to develop, customize and test their applications.

• Key features provides a platform with tools to test, develop and host applications in the same environment.

6 0
3 years ago
Other questions:
  • A.Viruses B.Spyware C.Spam D.Malware<br> Hd
    8·1 answer
  • What is the primary purpose of a business plan? To file for incorporation To help you identify your goals and plan how you will
    6·1 answer
  • Bullet points on a slide should be limited to _____. 2 4 8 10
    15·2 answers
  • Which of the following allows you to view and access important information about your document all in one location?
    11·2 answers
  • The picture that graphically represents the items you use in windows is called a/an
    15·2 answers
  • Assume that a large number of consecutive IP addresses are available starting at 198.16.0.0 and suppose that two organizations,
    13·1 answer
  • Your S3 backed website is consistently receiving over 400 read requests per second and is steadily rising. What can you do to ac
    14·1 answer
  • Write a program that prompts the user for an integer, then asks the user to enter that many values. Store these values in an arr
    14·1 answer
  • Use the drop-down menus to complete each sentence about the layers of the atmosphere.
    14·2 answers
  • Which of the following factors is most likely to result in low shipping and handling costs? A higher than average hourly pay rat
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!