Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hi, I've hit a roadblock on my homework assignment where my outputs are missing contact info or not in the right spot. Can you help

Hi, I've hit a roadblock on my homework assignment where my outputs are missing contact info or not in the right spot. Can you help me?

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed
(3) Output the linked list using a loop to output contacts one at a time. (2 pts) EX: CONTACT LIST Name: Roxanne Hughes Phone number: 443-555-2864 Name: Juan Alberto Jr. Phone number: 410-555-9385 Name: Rachel Phillips Phone number: 310-555-66104:Compare output ~ 0 /2 Output differs. See highlights below. Special character legend Roxanne Hughes 443-555-2864 Juan Alberto Jr. Input 410-555-9385 Rachel Phillips 310-555-6610 Person 1: , ~ Person 2: Roxanne Hughes, 443-555-2864 Person 3: Juan Alberto Jr. , 410-555-9385 CONTACT LIST Your output starts Name: Roxanne Hughese Phone number: 443-555-2864- with Name: Juan Alberto Jr. Phone number: 410-555-93854 Name: Rachel Phillipse Phone number: 310-555-6610 Person 1: Roxanne Hughes, 443-555-2864 Expected output Person 2: Juan Alberto Jr. , 410-555-9385 starts with Person 3: Rachel Phillips, 310-555-6610Output differs. See highlights below. Special character legend Roxanne Hughes 443-555-2864 Juan Alberto Jr. Input 410-555-9385 Rachel Phillips 310-555-6610 Person 1: , Person 2: Roxanne Hughes, 443-555-2864 Person 3: Juan Alberto Jr., 410-555-9385 CONTACT LIST Name: Roxanne Hughes Your output Phone number: 443-555-2864 Name: Juan Alberto Jr. Phone number: 410-555-9385 Name: Rachel Phillips Phone number: 310-555-6610 Person 1: Roxanne Hughes, 443-555-2864 Person 2: Juan Alberto Jr. , 410-555-9385 Person 3: Rachel Phillips, 310-555-6610 CONTACT LIST Name: Roxanne Hughes Phone number: 443-555-2864 Expected output Name: Juan Alberto Jr. Phone number: 410-555-9385 Name: Rachel Phillips Phone number: 310-555-6610TU. 14 LAB: Warm up: Contacts A linked list is built in this lab. Make sure to keep track of the head node. (1) Define the class ContactNode per the following specifications: . Private data members o string contactName o string contactPhoneNumber o ContactNode* nextNodePtr . Constructor with parameters for name followed by phone number (1 pt) Public member functions . GetName() - Accessor (1 pt) . GetPhoneNumber() - Accessor (1 pt) o InsertAfter() (2 pts) . GetNext() - Accessor (1 pt) o PrintContactNode() Ex: If the name is Roxanne Hughes and the phone number is 443-555-2864, PrintContactNode() outputs: Name: Roxanne Hughes Phone number: 443-555-2864 (2) Define main() to read the name and phone number for three contacts and output each contact. Create three ContactNodes and use the nodes to build a linked list. (2 pts) Ex: If the input is: Roxanne Hughes 443-555-2864 Juan Alberto Jr. 410-555-9385 Rachel Phillips 310-555-6610 the output is: Person 1: Roxanne Hughes, 443-555-2864 Person 2: Juan Alberto Jr., 410-555-9385 Person 3: Rachel Phillips, 310-555-6610

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction to Wireless and Mobile Systems

Authors: Dharma P. Agrawal, Qing An Zeng

4th edition

1305087135, 978-1305087132, 9781305259621, 1305259629, 9781305537910 , 978-130508713

More Books

Students also viewed these Programming questions

Question

Have you given consideration to family lifestyle issues?

Answered: 1 week ago

Question

Potential Strategic Moves for Kroger in the Next 2-4 Years

Answered: 1 week ago