Question: C++ Problem Use a Linked List to impliment the ADT checkbook, Your Check should have at least a checknumber, amount and payTo field along with

C++ Problem

Use a Linked List to impliment the ADT checkbook,

Your Check should have at least a checknumber, amount and payTo field along with constructor and get/set methods.

Your CheckBook should have at least a current balance, some state as to what the next check number should be, a linked list of written checks and the ability to write new checks and to deposit. The balance should not be allowed to go under 0.

Your main should create a checkbook, write 5 checks and show the state of the checkbook as this happens. One of these checks should try and take the balance under 0. At the end show the state of the checkbook.

//Interface For ADT List

//File ListInterface.h

#ifndef LIST_INTERFACE_H

#define LIST_INTERFACE_H

template

class ListInterface

{

public:

virtual bool isEmpty() const=0;

virtual int getLength() const =0;

virtual bool insert(int newPosition, const T& newEntry)=0;

virtual T getEntry(int position) const=0;

virtual T replace(int position, const T& newEntry)=0;

virtual ~ListInterface(){}

};

#endif

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!