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

  Which is a two-dimensional array of integers

You are to create a CourseGrades application that simulates a grade book for a class with six students that each has 5 test scores. The CourseGrades application should use a GradeBook class that has a member variables grades.

  Maximum speedup-achieved by pipeline over non-pipelined unit

Non-pipelined system takes 200ns to process task. Determine the maximum speedup that could be achieved with pipeline unit over the non-pipelined unit?

  Activities the overhead of using the services

While the staff agree and can see how the new untethered access to business data and services can help in their day to day activities the overhead of using the services due to authentication has made the system poorly accepted.

  Discuss some of the emerging trends in information

discuss some of the emerging trends in information technology e.g. computer hardware software data analysis. what

  Using information in the lesson 09 online content

Using information in the Lesson 09 Online Content

  Role of it in the contemporary business organization

Understand the central role of IT in the contemporary business organization. Understand the impact of the World Wide Web on the management of business

  What type of compression is not good

What type of compression is not good for the native use of microsoft word documents?

  Comparing accuracies using test options

Compare the accuracies obtained using the three "test options": "Use training set", "cross-validation" and "percentage split".

  What values are assigned to x when k has values

What values are assigned to x when k has values of 1,2,3,4, and 10?

  An application that stores at least four different courses

Write an application that stores at least four different course names

  Describe how to use d

Suppose you have two nonempty stacks S and T and a deque D. Describe how to use D so that S stores all the elements of T below all of its original elements, with both sets of elements still in their original order.

  Use a loop to traverse each character in the input string

Write a program in the file freq.cpp which reads a string from the user and computes the frequency of each letter that appears in the string.

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