Project1 - ECE 242 Project 1 Introduction: Stacks and...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
ECE 242 – Project 1 Introduction: Tower of Hanoi is a sim recursion in algorithms, but we using stacks and queues. The objective of t the above picture) to a rod on th rules: s Only one disk can be mov s A disk cannot be placed o 1.a) Implement a class, named A The stack should have the fol and sizeof(). 1.b) Create a class ArrayQueu the following methods: i. enqueue(item): Insert the item ii. dequeue(): Remove an elemen iii. isEmpty(): Returns true if the iv. isFull(): Returns true if the qu 1.c) Create an interface Disk an returns size of the the disk. 2. Problem statement The objective is to solve have to solve the problem on p the program. Stacks imple game which is usually used to demons are going to look at how we can represent and the game is to move the stack of disks (as show the extreme right (as shown on the right), obey ved at a time over a smaller disk ArrayStack , for a standard stack using an arra llowing methods: push(item), pop(), peek(), is ue that implements a queue
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

Project1 - ECE 242 Project 1 Introduction: Stacks and...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online