Create a class list containing class node

Assignment Help Basic Computer Science
Reference no: EM13794794

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: EM13794794

Questions Cloud

Main types of file managers : There are three main types of file managers used in different distributions of Linux. Orthodox file managers or "Commander-like" file managers have three windows (two panels and one command line window).
Using the lifo perpetual inventory method : A company had inventory of 21 units at a cost of $25 each on November 1. On November 2, they purchased 26 units at $26 each. On November 6, they purchased 22 units at $27 each. On November 8, they sold 50 units for $70 each. Using the LIFO perpetual ..
Accessories installed for no charge on their racing craft : What do you debit and credit for a journal entry for this? The rascal bar jetters were billed 303.80 plus sales tax (8%) for accessories installed for no charge on their racing craft.
The customer paid in cash for the work completed : Service and installation work were completed on a customer's jet ski personal watercraft and the customer paid in cash for the work completed. The sales invoice lists 156 for 2.4 hours of labor, 421.40 for accessories, and 8% sales tax on the total.
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..
What is the importance of turnover of accounts receivables : What is the importance of the turnover of Accounts Receivables? Why is it is essential for organizations to keep cash reserves on hands? Is it possible to still bring in a lot of revenue, but still be short on cash?
Ospf messages and icmp messages are directly encapsulated : OSPF messages and ICMP messages are directly encapsulated in an IP data- gram. If we intercept an IP datagram, how can we tell whether the payload belongs to OSPF or ICMP?
Assume average fixed costs : This problem continues the Davis consulting, Inc. situation from Problem P19-40 of chapter 19. Davis Consulting provides consulting service at an average price of $175 per hour and incurs variable cost of $100 per hour. Assume average fixed costs are..
Write a program that reads strings from the user : Write a program that reads strings from the user and writes them to an output file called userStrings.txt.  Stop processing when the user enters the string "DONE".

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Developing a strong supply chain management process

Developing a strong Supply Chain Management (SCM) process to match IS system upgrades would provide what advantage(s)? In general, what will this process look like?

  Design and test using logic works

Design and test using Logic Works a dual-output function to implement a full-adder in Sum-of-Products form. Show the transistor count on your schematic.

  What features look for switches and explain why want feature

You have been called in to consult on a new network design for CNT Books. The requirements of this design are summarized as follows: *The building has 3 floors. *There are 300 user workstations and 10 servers.

  Component interface for an emergency control room

As the lead software engineer for a medium-sized hospital, you have been asked to spearhead an effort to improve the tracking of Voice Over IP (VOIP) calls made within the hospital system.

  Analyze faster processor chip result increase in performance

Analyze the following statement: "Using the faster processor chip results in corresponding increase in performance of a computer even if main memory speed remains same."

  Sql queries using mysql

Query1 Write a SQL statement to display the course numbers of classes taught by Hammett Glenn. Query2 Write a SQL statement to display the course names of the courses taught by an instructor whose id is 415. Query3 Write a query to display the name ..

  Why random access file instead of a sequential access file

Write a 200- to 300-word response to the following question: In which situations would you choose to use a direct access or random access file instead of a sequential access file? Give a specific example and explain your reasoning.

  Provide an explanation of hash tables

Provide an explanation of hash tables, including a description of a realistic scenario that could be solved with the application of a hash table.

  Use one of more of the nonmonotonic reasoning system

Use one of more of the nonmonotonic reasoning system

  Town has two burger restaurants located across the street

A small midwest town has two burger restaurants located across the street from each other: 'Burgerama' and 'The Burger Brothers'. As both restaurants compete for the same customers, they are both considering offering a larger burger with more topping..

  Discuss the process for creating xml documents

Discuss the process for creating XML documents and apply this knowledge to develop XML and DTD documents.

  Use c++ write program that to factorial the prompted integer

use C++ write program that to factorial the prompted integer in the output

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