Program toinsert and delete any element anywhere in the list

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

You are to implement a 'List' class to handle a list with general operations. That means you can insert and delete any element anywhere in the list. The list has no order, except for the order you insert or delete. The methods you are to implement are as given:

Constructor methods (two, default and copy constructor, a list to a newly defined list, i.e. 'List listA(listB)'):

Empty returns true or false if list is empty or not.

Front makes current position at the beginning of the list.

End makes current position at the end of a list.

Previous places current position at the previous element in the list.

Next places current position at the next element in the list.

Get position returns current position or where you are in the list.

Set position (int) places current position in a certain position in the list.

Insert before inserts as a new element before the current position.

Insert after inserts as a new element after the current position.

Get element returns the one element that current position is pointing to.

Size returns the size of the list (number of elements in list).

Replace (int) replace the current element with a new value.

Erase deletes the current element.

Clear makes the list an empty list.

Reverse reverses elements in a list.

Swap swaps all the elemments of one list with the another list.

Overload the operators: (at least) << output, == , + , = (assignment)

You are to implement the List class using an array. For now the array can be 20 in size.

You will need to use the 'ElementType' for 'typing' your data.

You will need to use CAPACITY constant for the size of the array, in case we need to change the array size.

When adding two lists make sure its within capacity, otherwise ignore it.

When printing out the array across the screen horizontally, print only values that have been inserted, not all zeros.

Please see the attachement as well.

Attachment:- listmain.zip

Reference no: EM13938847

Questions Cloud

Determine the cost of the digital imaging machine : Determine the cost of the digital imaging machine. Explain why you included or excluded the $160 bracket replacement cost.
What surgical procedure will be performed : Mrs. Oberhaus needs surgery to correct a severe case of Raynaud's disease, affecting one of her hands. What surgical procedure will be performed? After the surgery, will she more likely to suffer from anhidrosis (lack of sweating) or hyperhidrosis..
Company on case study-vodafone group : Your guiding question is "how to operate successfully in an international environment?" The first part will be a case study focusing on a strategic problem, for example, (1) "why go further? where are you going to locate your manufacture plant?"
Determine the cost of the land and the building : Mooney Sounds, a local stereo retailer, needed a new store because it had outgrown the leased space it had used for several years. Determine the cost of the land and the building.
Program toinsert and delete any element anywhere in the list : You are to implement a 'List' class to handle a list with general operations. That means you can insert and delete any element anywhere in the list. The list has no order, except for the order you insert or delete. The methods you are to implement..
Appropriate international business strategy : The first area of the assignment is to specify an appropriate international business strategy that can provide the basis for exploiting the new or existing overseas business market.
Gradient of the line joining the two points : Identify which lines are parallel (Hint :- Parallel line have the same gradient and perpendicular lines when their gradients are multiplied you get -1) Find the gradient of the line joining the two points
Percent coupon bonds outstanding : Debt: 3,000 7.5 percent coupon bonds outstanding, $1,000 par value, 17 years to maturity, selling for 105 percent of par; the bonds make semiannual payments.
Create a short story : Create a short story (for 5 grades) with: clarify, falsify, pollinate, magnetise, magnify, commiserate, energise

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

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

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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