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
gayaneshka [121]
3 years ago
9

Create a linked list for library patrons. Put at least 8 patrons in the list. (You should hard code this data.) Ask for a person

's name. Tell if the person is in the list or not. If the person is in the list, show the person's information. Data fields are: Name, Library card number, Street, City, Zip
Computers and Technology
1 answer:
Evgesh-ka [11]3 years ago
7 0

Answer:

Explanation:

#include <bits/stdc++.h>

using namespace std;

/* Link list node */

class Node

{

public:

string Name;

long Library_card_number;

string Street;

string City;

long Zip;

Node* next;

};

/* Given a reference (pointer to pointer) to the head

of a list and an int, push a new node on the front

of the list. */

void push(Node** head_ref,string name,long lcn,string street,string city,long zip)

{

/* allocate node */

Node* new_node = new Node();

/* put in the key */

new_node->Name = name;

new_node->Library_card_number = lcn;

new_node->Street = street;

new_node->City = city;

new_node->Zip = zip;

/* link the old list off the new node */

new_node->next = (*head_ref);

/* move the head to point to the new node */

(*head_ref) = new_node;

}

/* Checks whether the value x is present in linked list */

Node* search(Node* head, string x)

{

Node* current = head; // Initialize current

while (current != NULL)

{

if (current->Name == x)

return current;

current = current->next;

}

return NULL;

}

/* Driver program to test count function*/

int main()

{

/* Start with the empty list */

Node* head = NULL;

int x = 21;

/* Use push() to construct below list

14->21->11->30->10 */

push(&head, "Joe",1,"hippy Street","Bay area",2009);

push(&head, "Marie",2,"lippy street","san jose",2010);

push(&head, "Harry",3,"gippy Street","Bay area",2009);

push(&head, "Ashish",4,"dippy street","san jose",2010);

push(&head, "Zuck",5,"sippy Street","Bay area",2009);

push(&head, "Gates",6,"kippy street","san jose",2010);

push(&head, "Page",7,"pippy Street","Bay area",2009);

push(&head, "Brin",8,"dippy street","san jose",2010);

string name;

cout<<"Enter name of the person to search: ";

cin>>name;

Node* z = search(head,name);

if(z!=NULL){

cout<<"\nPerson found in the list"<<endl;

cout<<"Name: "<<z->Name<<endl;

cout<<"Library Card Number: "<<z->Library_card_number<<endl;

cout<<"Street: "<<z->Street<<endl;

cout<<"City: "<<z->City<<endl;

cout<<"Zip: "<<z->Zip<<endl;

}else{

cout<<"No person found with the name "<<name<<endl;

}

return 0;

}

You might be interested in
Which one of following is an example of a formatted number using the Currency option?
scoundrel [369]
C.) $7,778.92 is an example of a formatted number using the Currency option.

$ - is a currency symbol of the United States Dollars
, - is a currency symbol that separates whole numbers into group of 3 digits.
. - is a currency symbol that separates the whole amount from the centavos amount
7 0
4 years ago
The study of sound and sound wave is called​
pishuonlain [190]

Answer: Acoustics

Explanation:

Acoustics is simply refered to as a branch in physics that studies sound and its wave.

Acoustics studies mechanical waves in liquid, solid state or gaseous state. Topics such as infrasound, vibration and ultrasound are studied. Someone who works in the acoustics field is referred to as an acoustician.

7 0
3 years ago
Which of the following scenarios can best be addressed by operations management?
Alborosie

Answer:

We need to shorten the time it takes to pick a customer order.

Explanation:

The operations management is the department in charge of supervising the operations related to the production and delivery of a product or a service of a company to its customers.

It would then them who would be in charge of reviewing the process or steps it takes to pick a customer order.

The other options are issues for the human resources department.

7 0
3 years ago
Richard wants to create a cloud-based system that will be a centralized repository of log files from various servers in the orga
jeyben [28]

Answer:

CAD ( d )

Explanation:

Richard should use CAD to create a cloud-based system, since he wants it to be a centralized repository of log files to be taken from the different servers associated with the organization

CAD ; Computer aided design software is the best software to be used because files created using CAD can be easily stored in cloud and it is easily accessible.

4 0
3 years ago
With all of the digital data being collected today the size and number of databases are exploding. this volume of data is often
miss Akunina [59]

With all the digital data being collected today, the size and number of databases are exploding. This volume of data is often called blank big data.

<h3>What is digital data?</h3>

Digital data is the form of data that is digitalized or in digital form. These data are stored in memory cards or chips in the devices. This information is in the form of encryption codes.

The data from human language is converted into computer language. The computer language is in the form of binary codes. The form is 100101010. The language is understood by the computer.

Thus, the volume of data is often called blank big data.

To learn more about digital data, refer to the link:

brainly.com/question/21090939

#SPJ4

7 0
1 year ago
Other questions:
  • How do you change brightness on acer laptop?
    7·1 answer
  • How do you think calculator of a computer works? describe the procedure.
    7·1 answer
  • In a bubble sort, you use a(n) ____ loop to make pair comparisons.
    5·1 answer
  • What are the preset formulas in a spreadsheet called?
    6·2 answers
  • Suppose there are two hosts, S and R. They are communicating over a TCP connection, and R has already received from S al bytes f
    11·1 answer
  • PLS ANSWER ASAP I WILL GIVE BRAINLIEST
    11·1 answer
  • Anybody know any educational game sites unblocced in school besides funbrain and pb skids
    12·1 answer
  • Which of the following jobs usually requires some level of formal higher education other than vocational training?
    14·2 answers
  • A typical day in programming and software development would involve
    7·1 answer
  • Who is better, Tom, Ben, Hank, Angela, or Ginger
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!