Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Learning MySQL Get A Handle On Your Data

Authors: Seyed M M Tahaghoghi

1st Edition

0596529465, 9780596529468

More Books

Students also viewed these Databases questions