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

  Computer programming using c language lab

Computer programming using c language lab

  What do the loops print

What do the following loops print? Work out the answer by tracing the code, not by using the computer. a. int s = 1; for (int n = 1; n

  Program to produce ten random permutations of numbers

In C++(must be able to compile in Visual Studio ): Write a program to produce ten random permutations of numbers 1 to 10.

  Write a program that convert fahrenheit to degrees celsius

Write a program that will convert Degrees Fahrenheit to Degrees Celsius.

  Write a c program that copies the contents of one file

write a c program that copiest the contents of one file to a destination file. This program works by first prompting the user for the name of the source file and destination file.

  Define the class bankaccount

Define the class bankAccount to implement the basic properties of a bank account. An object of this class should store the following data: Account holder's name (string), account number (int), account type (string, checking/saving), balance (double),..

  Write a function named dietoss that simulates the tossing

Write a function named dieToss that simulates the tossing of two dice. When you call the function, it should generate two random numbers ranged in 1 to 6 and return the sum of the die's numbers. In the mail program, ask user how many times the dice s..

  Write a loan calculator program

Write a loan calculator program in C++ that displays monthly balances for user-specified loan terms. To be flexible, you decide to specify the loan terms in a file and provide that filename  entered from the keyboard. To keep things simple

  Implement circular linked list in c program

implement circular linked list in c program in the best possible easiest way.

  We can combine assignment statements

We can combine assignment statements, for-loops, and if statements to perform a wide range of tasks with lists. Suppose we have a bookstore with each book defined as follows: Book = namedtuple('Book', 'author title genre year price instock') , wher..

  Random permutations

Write a program in C++ that gives a prompt to the users, asking for an integer M.It then prints out a M different random permutations, one on each of M lines, of the numbers 1, 2, ... , 10, separated by spaces or tabs.

  Give a recursive definition of s.

Let S be the set of positive integers that can be written as a sum of one or more 4's and/or 7's. For example, 7 ? S and 18 ? S (because 18 = 4 + 7 + 7)

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