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

  The factorial of a positive integer n, denoted by n!

Write a program that computes the sequence of factorial values: 1! = 1, 2! = 2, 3! = 6, 4! = 24, 5! = 120, 6! = 720, ....

  Create a graphical calculator with buttons

Create a graphical calculator with buttons that can add, subtract, multiply, divide, +/-, Sin, Cos, Tan, clear and Modulus and write a method for each of these calculations that will accept the needed incoming numbers and return the calculated value.

  Write a program that will call a function

Write a program that will call a function called writeDataToFile to prompt a user for their first name, last name and zip code, and print this information to a file called "UserData.txt". The main function should prompt the user for the same infor..

  Write a program to calculate the area of a circle

Write a program to calculate the area of a circle. The program should use two procedures. The first procedure will print out the program heading and ask the user to enter the radius. The second procedure should calculate the area. The area of the cir..

  Recursive function

What is the result of the following recursive function when called with mm(10)? Write out the execution trace of this call to mm(10).

  Programming assignment is to tweak the existing mammal

programming assignment is to tweak the existing Mammal program and create your own Vehicle program.

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  What is the output of the program below

What is the output when the following code fragment is executed?

  Search for the value needle in the array

Search for the value needle in the array range given by [hay_begin ... hay_end), using the Linear Search algorithm. This function will return a pointer to the needle value if it is found, or a null pointer if needle is not found.

  Write a computer program to prepare a linear support vector

write a computer program to prepare a linear support vector machine svm. prepare a report and deliver the report

  Write a function named smallest that receives three integer

Write a function named smallest that receives three integer arguments and returns the smallest of the three values.

  The method takes an array

The method takes an array of integers and returns true if there exists any item in the array that satisfies a specified condition. For instance, the following code fragment:

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