Question 1a doubly linked list is like a linked list except

Assignment Help C/C++ Programming
Reference no: EM13347748

Question 1

A doubly linked list is like a linked list except that each node has a pointer both to the next node in the list and to the previous node in the list. There are also pointers to the two ends of the lists, called for example Left and Right. The values should be stored in order with the least value at the left and the greatest value at the right. Thus a list with 4 nodes containing the data 3,6,7,10 should look like this:

Write a class which will store a doubly linked list of integers (or another type if you prefer) in order, and which will allow the following operations:

1. A constructor and a destructor.
2. Insert a new element chosen by the user at the correct place in the list; for example inserting 8 in the list above will give the list 3, 6, 7, 8, 10.
3. Delete a data element chosen (by value) by the user, for example deleting 6 from the list above will leave 3, 7, 10.
4. List elements from left to right (i.e. in ascending order).
5. List elements from right to left (i.e. in descending order).

You should also write a suitable main program to allow comprehensive testing of the class and its operations.

Question 2

A museum has a collection of old posters advertising events of various kinds (theatre, sport, fairs, lectures etc.). It wishes to keep a record of these, containing, for each poster

1. a reference number,

2. a short description of the event being advertised,

3. the date (day, month, year) of the event.

A program is required which allows the user to enter the details of the posters (in arbitrary order). It should then be able to produce a list of the posters, in order of the date of the event advertised, and split up into different centuries (i.e. 1701-1800, 1801-1900 etc.). You can assume that no poster has a date earlier than 1100. If there is more than one event on the same day, they should be given in alphabetical order of the event description. Write a program which allows all of this to be done.

 

Reference no: EM13347748

Questions Cloud

Auditing project overviewnbsp casenbsp you will be asked to : auditing project overviewnbsp casenbsp you will be asked to address a accounting failure from american insurance group
Introductionbluesky systems is a software development : introductionbluesky systems is a software development company that builds software components for a variety of private
Gary and sally decided to go on a holiday they consulted : gary and sally decided to go on a holiday. they consulted their local tour company fly by night tours who advertised a
The objective of this case is to estimate the cost of : the objective of this case is to estimate the cost of capital the occ that ameritrade should use in evaluating
Question 1a doubly linked list is like a linked list except : question 1a doubly linked list is like a linked list except that each node has a pointer both to the next node in the
You are required to prepare a program for assessment system : you are required to prepare a program for assessment system of a university. the main idea is to evaluate the gpa
Question oneassume as a vc that you want to establish a : question oneassume as a vc that you want to establish a pre- and post-money valuation in support of the issuance of a
Show all work by describing variables stating assumptions : show all work by describing variables stating assumptions illustrating model and showing output solution to the
Problem 1 investing in the stock marketjohnson and johnson : problem 1. investing in the stock marketjohnson and johnson jnj is trading at 68.15. jnj is a large health care

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Write c program that will input two values from the user

write c program that will input two values from the user with a prompt ? that are a value and a base with which you

  Write a program that allows two players to play a game

Write a program that allows two players (player X and player O) to play a game of tic-tac-toe. Use a two- dimensional char array with three rows and three columns as the game board. Each element of the array should be initialized with an asterisk ..

  To use a sentinel loop so once the value of -99 i

modify this program to use a sentinal loop so once the value of -99 is entered after getting the pay and hours the program should end.

  Static field holds rent due date for an office

// static field holds rent due date for an office - // rents are due on the 1st

  Write a program that displays the cubes of the numbers

Write a program that displays the cubes of the numbers from 1 to 10. Recall that the cubes of a number is just the number multiplied by itself and then by itself again.

  Define a class for file that is derived from document

Similarly, define a class for File that is derived from Document and includes a instance variable for the pathname. The textual contents of the file should be stored in the inherited variable text. Redefine the toString method to concatenate all t..

  The function should return a value

The function should return a value of 1 when it is given a valid score to process and 0 when the received value is out side of the 0-10 range. In this case it should print a waring message on the screen

  Define a function named average grade

Define a function named average grade. This function returns a double and has four double arguments, testi, test2, test3, test4. The return value should be the average, or arithmetic mean of the four arguments.

  A hierarchical jpeg encode decoder for greyscale images

This project is to develop a program that implements a hierarchical JPEG encoder/decoder for greyscale images.

  T computes and posters the probabilities of two people

Write a C program that computes and posters the probabilities of two people in a group who are born in the same day. The probability of two people being born in the same day of the year, for a group of  n people, is given by the following formula:

  Make a program to play lottery

make a program to play lottery. The program randomly generates a Lottery of a three-digit number( any number from 100 to 999), prompts the user to enter a three-digit number, and determines

  Write a c++ statement that multiplies the value

Write a program that prompts the user to input a decimal number and outputs the number rounded to the nearest integer.

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