c++ with functions please.

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

c++ with functions please.

Post by answerhappygod »

c++ with functions
please.
C With Functions Please 1
C With Functions Please 1 (65.22 KiB) Viewed 57 times
Overview In this project, you will use linked lists to maintain contacts and their information. You will complete the Contact List class, which wraps a linked list of contacts where each Contact has a linked list of Info. Classes There are three classes with the following information: class Info { } string name; string value; Info *next; class Contact { } string first; string last; Contact *next; Info *headInfoList; class ContactList { Contact *headContactList; int count;
For example: ContactList count: 4 headContactList: ↓ first: Wanda last: Maximoff headInfoList:→ next: ↓ first: Peter last: Parker headInfoList:→ next: ↓ first: Natasha last: Romanoff headInfoList:→ next: ↓ first: Tony last: Stark headInfoList:→ next: nullptr nullptr name: alias value: Spider-Man next: → name: alias value: BlackWidow next: → name: alias value: IronMan next: → name: color value: red-and-blue next: → name: birthday value: December-3-1984 next: → name: color value: red-and-gold next: → nullptr name: email value: [email protected] next: → nullptr nullptr
Files This project consists of three files: 1. main.cpp - The interface that prompts for and performs actions. 2. p3.h Definitions of classes. 3. p3.cpp - Implementation of the class methods in p3.h. • To compile this project, use g++ -Wall main.cpp p3.cpp -std=c++11. You can download the templates below under Submission Instructions. Complete the class methods in p3.cpp. You are allowed to modify p3.h and add additional methods to the classes. You are encouraged to write more methods and functions than those listed, but you must not change the class names or the method signatures already defined. Approach dually, It is recommended to complete this project one method at a time, working from the easiest to the hardest. Each will be graded indivi so you can get partial credit. • addContact, addInfo, printContact, print • addContactOrdered and add InfoOrdered • remove Info and removeContact • destructor, copyConstructor, operator= Think about helper methods/functions you can write. What actions need to be repeated? What methods could be broken into several smaller methods? What methods can you call inside other methods to help solve the problem? The destructor needs to remove. The copyConstructor and operator= need to add, etc. Develop incrementally and test often.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply