Create a class list containing class node

Assignment Help Basic Computer Science
Reference no: EM13796721

1. Create a simple linked list program to create a class list containing class node { void *info; node *next; public: node (void *v) {info = v; next = 0; } void put_next (node *n) {next = n;} node *get_next ( ) {return next;} void *get_info ( ) {return info;} }; Be able to initially fill the list. Provide functions to insert/append nodes and remove nodes from the linked list. Be able to display the contents of the list. Write a little driver program with at least 5 values passed in (so that 5 nodes are created) as you insert/append, delete and display data, showing the programs operation. 2. Create a program that uses a derived class based on the list class you've created in the first program. This program will use a stack data type. class node { void *info; node *next; public: node (void *v) {info = v; next = 0; } void put_next (node *n) {next = n;} node *get_next ( ) {return next;} void *get_info ( ) {return info;} }; class list { node *head; int node_num; public: list ( ) { node_num = 0; head = 0;} void remove (int); void insert (void *, int); void append (void * v) {insert (v, node_num + 1); } void *find (int); void display ( ); }; Write functions to push and pop the stack. Write a driver main program which gives 5 values (5 nodes created) that will push, pop and display data stored. 

Reference no: EM13796721

Questions Cloud

Characteristics of the early american militias : Select three characteristics of the early American militias. Compare these with three characteristics of the current American military.
Heat transfer, electricity & earth''s magnetic field : Describe the differences and similarities between temperature and heat.
Comparative advantage in producing oil : Saudi Arabia has a comparative advantage in producing oil because it:
Explain why the cost structure associated : Explain why the cost structure associated with many kinds of information goods and services might imply a market supplied by a small number of large firms. (At the same time, one internet business such as grocery home deliveries have continually suff..
Create a class list containing class node : 1. Create a simple linked list program to create a class list containing class node { void *info; node *next; public: node (void *v) {info = v; next = 0; } void put_next (node *n) {next = n;} node *get_next ( ) {return next;} void *get_info ( ) {retu..
The role of oxygen in cellular respiration issues : What method is often used by cells to move large solid material into the cell?
A country will likely experience an increase in poverty : A country will likely experience an increase in poverty if
The average and how many scored below : Professor Merlin has asked you to help him. He has 100 total students in his four classes but he is not sure that all of them took his last exam. He wants to average the grades for his last exam in four sections of his medieval literature course and ..
What is political rule in augustine : What is political rule in Augustine? How does he use the distinction between the civitas Dei and the civitas terrena in constructing his notion of the state?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Database development

Recommend at least three (3) specific tasks that could be performed to improve the quality of datasets, using the Software Development Life Cycle (SDLC) methodology. Include a thorough description of each activity per each phase.

  Flowchart, psuedocode and desk check

Flowchart, psuedocode and desk check

  Which access database object asks a question about data

Which Access database object asks a question about the data stored in a database and displays specific fields and records that answer the question?

  Determine if the given subset is a subspace

Determine if the given subset is a subspace of the given vector space. Prove your claim - Is the set P of all polynomials of the form p(x) = a+x2, with a ? R, a subspace of P2?

  Develop a virtualization adoption plan

Develop a virtualization adoption plan applicable to the scenario by doing the following- Explain how the benefits of virtualization would impact the city of Seabreeze.

  Values referred to by ref-variables

Write expressions to compute the following functions of the values referred to by ref-variables x and y, which we shall assume refer to reals.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Low enforcement agencies during an incident

Low enforcement agencies during an incident

  Explain whetherucita should or should not be adopted

What are your arguments in support of these points? You really did not answer the question as these don't really explain whether you believe the UCITA should or should not be adopted.

  Explaining good message digest function

Then calculate message digest on the result. Would this be a good message digest function? Describe. Message digests are reasonably fast.

  Autoparts warehouse

AutoParts Warehouse is a small auto parts supplier with locations in several Midwestern metro areas. The business is based on the idea of discount prices for auto parts that are always in stock or can be delivered within hours. The owners have decide..

  Strategic planning on the it systems

Discuss two major issues involved with acquiring systems and two major issues commonly faced when maintaining them. Address how each can be minimized or overcome.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd