Write program that test whether input string is a palindrome

Assignment Help Data Structure & Algorithms
Reference no: EM131357818

Lab Assignment

There are six exercises in this iLab, although not all of them will be required for submission. Be sure to read the following instructions carefully.

Exercises 1 and 4: No submissions are required.

Create a folder and name it Week 3 iLab. Inside this folder, create the subfolders Ex2, Ex3, Ex5, and Ex6. Place the solution to each of the four exercises required for submission in the corresponding subfolder. Compress the folder Week 3 iLab using a program like WinZip, and drop the resulting zipped folder into the Dropbox.

Note that Exercises 2, 3, 5, and 6 require software development. Place only .java files in the corresponding folders. Do not submit the .class files or other files or folders that are generated by the IDE.

Exercise 1: Review of the Stack ADT

Create a project using the classes in "A Simple Stack Class". Compile the project, run it, and review the code that is given carefully. This code tests the stack class provided in the lecture.

Exercise 2: An Improved Stack Class

Modify the stack class to include appropriate error messages if invalid conditions occur-for example, trying to pop an item when the stack is empty.

Exercise 3: Using a Stack in an Application

Write a Java program that uses a stack to test whether an input string is a palindrome. Defines "palindrome" and asks you to describe a solution to this problem. As you can see, you will need to read to find the meaning of palindrome.

To implement the solution to this problem, use the stack of characters from the previous exercises (1 and 2).

Exercise 4: Review of the Queue ADT

Create a project using the classes in "A Simple Queue Class." Compile the project, run it, and review the code that is given carefully. This code tests the queue class provided in the lecture.

Exercise 5: An Improved Queue Class

Modify the class queue to include appropriate error messages if invalid conditions occur-for example, trying to dequeue an item when the queue is empty.

Exercise 6: Using a Queue in an Application

Simulate a small airport with one runway. Airplanes waiting to take off join a queue on the ground. Planes waiting to land join a queue in the air. Only one plane can use the runway at any given time. All planes in the air must land before any plane can take off.

Attachment:- Classes.rar

Reference no: EM131357818

How can you describe the use of implode and explode

Discuss about client-side validation and server-side validation. How would you do validation to protect web page from malicious attack? How can you describe the use of implo

How important is the documentation of database environment

How important is the documentation of the database environment? Moreover, how do you think the advent of cloud computing has affected electronic data interchange (EDI)? Are

Explain introduction of the sorting algorithm that you have

A brief introduction of the sorting algorithm that you have selected and how the two versions of the algorithm compare. How your results compare to your Big-Θ analysis?

Is it better to use an arraylist or a linkedlist

What is the time complexity of this method? You need to write a program that frequently iterates through all the items in a list. Is it better to use an ArrayList or a Linked

Which must be imported in a program in order to use the java

CST 227- Which of the following must be imported in a program in order to use the Java stack class? In a linked list implementation of a stack, only a fixed number of elements

What is time-complexity to insert item at end of linked list

CST 227- What is the time-complexity to insert an item at the end of a linked list? In an ordered list, we need to modify the algorithms (from a normal linked list) to implem

Write a test program for tracking their course sections

A college wants to you to write a test program for tracking their course sections. Classroom capacities on campus range from a minimum of 1 student to a maximum of 30 student

Write a class to represent a dynamically sized array

Write a class to represent a dynamically sized array of integers. Name it DynArray. An integer representing the array size (allocated space) - an integer representing the amou

Reviews

Write a Review

 
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