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

Questions Cloud

What is the chicago school argument : What is the "Chicago School" argument against concerns that vertical integration is anticompetitive? Under what conditions might this argument be wrong?
How do you think that history textbooks will portray : One hundred years from now, how do you think that history textbooks will portray America from 2000-2014?
Compare and contrast the required elements of liability : Compare and contrast the required elements of liability as an aider and abettor in the commission of a crime versus the required elements of criminal liability under the common design or plan.
Discuss the confidence interval approach : Discuss the confidence interval approach and the test of significance approach in hypothesis testing.
Write program that test whether input string is a palindrome : 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.
Burton cumming''s explicit cost per month : a. How much are Burton Cumming's explicit cost per month? How much are his implicit cost per month? b. What is the dollar amount of the opportunity cost of the resources used by Burton Cumming each month?
Null and alternative hypotheses : In a sample of 100 people who have had strokes, the average cholesterol level was 250 with a standard deviation of 40. In order to test the hypothesis (at the 5% level of significance) that the average cholesterol level of people who have had stro..
What is the role of the pos system in forecasting : Describe three different forecasting applications at Hard Rock. Name three other areas in which you think Hard Rock could use forecasting models. What is the role of the POS system in forecasting at Hard Rock
Overview on the subject of virtual teaming : Write a couple paragraphs/ give an overview on the subject of Virtual Teaming. (rules,values,importance). Explain thoroughly how stock portfolios affect the risk to an investor. What is the IRR of the following cash flows: Year???Cash Flow 1 -$16,400..

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Algorithm to produce a list of customers

Draw an algorithm to produce a list of customers from the Glad Rags Clothing Company's customer master file.

  Creating algorithm broken into sequence of words

Katt wishes you to create an algorithm that, given a string X, determines efficiently how many ways X can be broken up into sequence of words.

  Design an algorithm that prompts jason to enter the number

Design an algorithm that prompts Jason to enter the number of items ordered and the price of each item. The algorithm then outputs the total billing amount.

  Creating an hierarchy chart

Regal Brakes Corporation requires to automate its payroll calculation system. To compute payroll, first the gross pay is calculated, which is equal to the item of the number of hours and hourly rates.

  Created a linked list class

created a linkedlist class

  Find optimal routing for the trucks

Based on the provided coordinates, compute the rectilinear distance between the nodes. All nodes have to be served in one day by several trucks. Find optimal routing for the trucks with the least total distance, by applying any of the methods prese..

  Describing the data types

Create a 10-12 slide presentation describing the data types. Include the following in your presentation: Introductory slide and Slide for each data type

  Develop a profile of various projects for risk visibility

A key point in project portfolio management is that the IT manager must determine the risk associated with each project and develop a profile of various projects for risk visibility.

  What is the running time of quicksort

What is the running time of QUICKSORT when all elements of array A have the same value - Why do we analyze the expected running time of a randomized algorithm and not its worst-case running time?

  Write algorithm which divides n objects of u into k clusters

Suggest the algorithm which divides n objects of U into k clusters, making use of MST of a graph. Give a simple argument of correctness and bound on the running time of the algorithm you are proposing.

  Explain message switching network & packet switching

Sometimes when a mobile user crosses the boundary from one cell to another the current call is abruptly terminated even though all transmitters and receivers are functioning perfectly Why?

  Show that there exists an election algorithm for hypercubes

Show that there exists an 0 (N log N) election algorithm for hypercubes without a sense of direction. Show that there exists an O(N(log N +k)) election algorithm for networks with bounded degree k

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