Create a program for telephone lookups

Assignment Help Programming Languages
Reference no: EM13772178

Palindrome

A palindrome is a string that reads the same front to back as it does back to front, such as "racecar". Solve the palindrome question using a Stack class, implemented as a linked list, (not an array) (you must code it - do not use the library Stack class), and a Queue class implemented as a linked list, (not an array) The Stack class should have a constructor, pop, push, and isEmpty methods. The Queue class should have a constructor, enqueue, dequeue, and isEmpty methods. Each class will have a private embedded Node class. For up to 15 points bonus, rather than using java's linked list class, create your own singly linked list and use it to implement the stack and queue classes.

Read in a string of any size, strip it of any punctuation and blank characters, and then reduce it to all lower case. Then push the string characters one by one into a stack and insert them one by one into a queue. As long as there is data in the stack and queue, pop from the stack and remove from the queue comparing the characters popped and removed. If the characters continue to be equal until the stack and queue are empty, the string is a palindrome. Run the program four times using 2 phrases that are palindromes, two phrases that are not palindromes. Be sure to test Madam, I'm Adam!!! and "abca" as two of your choices.

Turn in the source, output, and UML for the stack and queue classes.

Telephone Lookups

Create a program for telephone lookups. Your tasks are to allow the user find a number that is associated with a name and if given a number, find the name associated with it (normal and reverse lookups).

The data file phoneList.txt is a listing of 1000 names and phone numbers in random order. Each line of the file consists of a last name, a first name and a telephone number with area code structured as follows: Mallanda Adam 770 816-6193. phonelist2 is a list formatted in a similar manner but it has errors built in to the listing. For up to 15 points bonus, use this listing , finding the errors, generating an error list and still building the collection but only with valid data.

You should have a class for the data and an array for holding those 1000 objects. The class should implement the comparable interface, have a toString and any other methods you have a need for. This class should not have sort or search methods. Those can be in other classes of their own.

You must write and use insertion sorts for any sorting performed in this project.

Since we are not adding or removing data once the array is built, and since memory is relatively cheap, build and sort your arrays before doing any searches. Do not re-sort the arrays between searches.

The use of a binary search is required for both searches.

Turn in the client, the classes and output showing that you can find numbers from names, that you can find names from numbers and showing how you handle the cases where the names or numbers are not in the data set.

Reference no: EM13772178

Questions Cloud

Explain information technology effects on organization : Explain Information Technology Effects on Organization, Library Services advantages?, Technology and Data Management? and Effects of using computers for learning English Language.
Create a test class that tests your survey class : Create a test class that tests your survey class. This should test all of the members added to this point in any way that you desire, as long as it is proven that they function as required.
Write a research paper about the history of the ebola virus : Write a research paper about the history of the Ebola virus can you help me?
Hannah and sam run moretown makeovers a home remodeling busi : Hannah and Sam run Moretown Makeovers, a home remodeling business. The number of square feet they can remodel in a week is described by the Cobb-Douglas production function. Q=F (L,K) Q=10L0.5K0.5 where L is their number of workers andKis units of ca..
Create a program for telephone lookups : Create a program for telephone lookups. Your tasks are to allow the user find a number that is associated with a name and if given a number, find the name associated with it (normal and reverse lookups).
Write a research paper for upper management examining : Write a research paper for upper management examining the feasibility of this. Your report show focus on the economic, social, legal, and ethical issues associated with the particular technology.
What the size of the reaction quotient indicates : What the size of the reaction quotient indicates regarding the extent of the forward reaction - the equilibrium concentration of sulphur gas if 0.070 mol of hydrogen sulphide gas is initially placed in the vessel.
Undernutrition or overnutrition problem issues : What type of protocol would you use to manage your client's nutritional deficiencies?
Example of a behavior that our society : Discuss an example of a behavior that our society once considered deviant but is no longer viewed as deviant today. Discuss a behavior that we consider deviant today but that once was viewed by society as "normal" or acceptable behavior.

Reviews

Write a Review

Programming Languages Questions & Answers

  Construct a diagram using rationaleto map the arguments

Construct a diagram using Rationaleto map the arguments about a moral claim that you have identified in the article/case study

  Develop a domain-specific language within ruby

Develop a domain-specific language within Ruby, such as for manipulating files in a directory system, editing files, generating quizzes, describing graphical or geographical scenes, and adding and viewing entries in a calendar.

  Write a powershell script changenames

Create a batch file CHANGENAMES.BAT that does the following (note that %1, %2, and %3 refer to command line arguments passed to the batch file when executed): Creates a set of %1 empty files with randomly generated names, with filename extension %2..

  Write a program to input an double array

Write a program to input an double array, and then computes some simple statistics on that array. The program should have two user-defined methods to help you with the task.

  Sql statement that displays the isbn-title and profit

Provide a SQL statement that displays the ISBN, TITLE and PROFIT for all books where the COST is greater than or equal to $10.00 and less than or equal to $40.00. (The PROFIT is the difference between RETAIL and COST.) Include only those books tha..

  Prepare a assignment in sql

Prepare a assignment in SQL. To create two table names (not in use employee ,product ,order )- Separate queries of all function,screen shots and queries.

  Write a program that takes a single directory as an argument

Write a program that takes a single directory as an argument, and iterates through all the normal files in the directory, and concatenate them to standard out.

  Calculate the difference between the number and the average

Write a program that will input an array of 10 REAL4 numbers into an array, and that will calculate the average value of the array and the standard deviation.

  Write a class to accepts no parameters and returns no value

Write class named ParkingMeter containing:A method named tick that accepts no parameters and returns no value. tick decreases value of timeLeft by 1, but only if value of timeLeft is greater than 0.

  Develope a tutoring software for an elementary school

You are the project manger for a company that is planning to develope a tutoring software for an elementary school that will follow their curriculum create a work breadown structure.

  Application to inputs five numbers given between a range

Write an application that inputs five numbers, each between 10 and 100, inclusive. As each number is read, display it only if it's not a duplicate of a number already read.

  Create a college course to display the course data

Create a CollegeCourse that does not include the lab fee. Then display the course data. Save the files as CollegeCourse.java, LabCourse.java, and UseCourse.java.

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