Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

i want to code in c++ lanuage You are given two header files called stackADT.h and linkedStack h which are used in order to implement

image text in transcribed
i want to code in c++ lanuage
You are given two header files called "stackADT.h" and "linkedStack h which are used in order to implement a stack structure by using a linked list. You will use the help of this linked-list type stacks in order to write a program which will convert decimal numbers into binary numbers. Program will ask the user to enter a decimal number. The general algorithm you are expected to implement by using the given linked stack structure is as follows: After the number is entered, program will push that number's mod result by 2 into the stack and the number will be divided by 2. This will continue until the number is greater than 0 and when the number becomes 0, you will terminate the loop and print the binary equivalent of that decimal number in parallel. The remainders which are stored in the stack will be popped in a last in first out order this operation will show the binary representation of the desired number In the program files provided, certain code snippets are removed for you to fill and specified via comment columns. You are expected to both implement the decimal to binary conversion algorithm using the linked type stacks and fill in the necessary code implementations for the linked-stack structure. Define the necessary stack object in your main program. 1) Implement necessary code snippets in order to prevent recursively calling header files/ overlapping header files. 2) Complete the code for following functions: a) isEmptyStacko: Checks the stack whether or not it's empty and returns true if it is empty, false otherwise b) isFullStack(): Checks whether the stack is full or not. Returns true if the stack is full and returns false if it is empty. c) initializeStacko: Function for advancing the stack Top and initialize the stack accordingly 3) Fill in the implementation of assignment operator overload 4) Use the help of completed linked-stack structure and implement a decimal to binary conversion algorithm on your main program by using it. Create necessary objeets and define a function for calling the algorithm if you need to Good Luck

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

Practical Database Programming With Visual Basic.NET

Authors: Ying Bai

1st Edition

0521712351, 978-0521712354

More Books

Students also viewed these Databases questions

Question

How does channel length factor into distribution channel design?

Answered: 1 week ago

Question

Apply your own composing style to personalize your messages.

Answered: 1 week ago

Question

Format memos and e-mail properly.

Answered: 1 week ago