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

  Submit a java program comprising two source files

Submit a Java program comprising two source files: MyArrayList.java, defining a generic MyArrayList class representing "stretchy" arrays. This class is to mimic some features of the built-in ArrayList generic collection class .

  Implement a sequence recognizer

Implement a sequence recognizer that outputs 1 whenever a sequence of input bits ends in "0010" or "100". This circuit receives (as input) one bit per clock cycle and outputs the value 1 whenever the sequence 0010 or 100 appears

  Write a java application that inputs three integers

Write a Java application that inputs three integers from the user and displays the sum, average, product, smallest and largest of the numbers.

  Why information security is not factor for organization

But would not require to give for information security on those systems. Explain that environment and desribe why information security is not factor for that organization.

  Research cloud computing topologies

Explain some of the challenges in implementing and managing cloud topologies (make sure you include relevant skills needed to manage a cloud network for an organization.

  Use a common data center of twenty

Analyze and explain how you would use DNS in your plan. Compose a two-paragraph executive summary highlighting the main points of your plan. Use at least three (3) quality resources in this assignment.

  How the organisation has used is-it to address

how the organisation has used IS/IT to address and service its' market, not just on the products it provides.

  What is the relationship between transistor densities

In two paragraphs explain what is the relationship between transistor densities and the improvement in computer speed and miniaturization?

  The project involves completing and extending the c++ progra

The project involves completing and extending the C++ program that evaluates statements of an expression language.

  Assume that you are serving in the role of director of data

imagine that you are serving in the role of director of data center operations for your company which is currently

  Finding different sizes of newspaper for local newspaper

Comprise a specific recommendation regarding how many different sizes newspaper must offer.

  Conduct an internet search for the oecd

The Organisation for Economic Co-operation and Development (OECD) has created a list of principles to aid organizations in dealing with people and organizations in different countries with different cultures.

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