Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java code please help ASAP! You dont need to test your code.(It doesn't to be 100 correct, do much as you can) I will give

Java code please help ASAP! You dont need to test your code.(It doesn't to be 100 correct, do much as you can) I will give you a thumb up if you help meimage text in transcribed

11. [22 points] In the information age, it is hard to deal with all of the text bombarded at us. You decide you are going to make an information condenser. Write a class Condenser for this purpose. The main job of this class is the ability to take in a string, and convert it to a condensed string. Luckily the way we will condense strings is simple. It simply removes the vowels in the string. Surprisingly text can still be understood (sometimes). A few examples: "Ivi rd" "a level road" "tell him to be silent" "wow, that is cool!" til hm tb sint" "ww, tht s cl!" Okay maybe we can't really understand the condensed text, but who cares, let us do it anyway. We need the following methods implemented: Zero argument constructor. For obvious reasons you need a way to construct an instance of this class. Copy constructor. You must write a copy constructor for this class. String condense (String s) - this method returns a condensed version of the input string. boolean isCondensed (String s) - returns true if the string is already condensed. A string is already condensed if it contains no vowels (a, e, i, o, u, y) Set getoriginals () - returns a set of all of the strings that this instance has condensed. To be clear it returns the original strings, not the condensed versions. boolean isCondensedPair (String original, String condensed) - returns true if condensing the string 'original' would lead to the string 'condensed'. This method must run in O(1) time for original' strings that have already been seen by this instance. It can have any runtime efficiency for original' strings that have not been seen before. equals - override the equals method. This will check if the two instances have condensed the same strings. Hints: A class must keep track of any necessary data. Your class must track at least which strings you have condensed before. All characters will always be lowercase for this problem. Pretend that uppercase characters don't even exist. We consider 'y' to be a vowel always. Vowels include a, e, i, o, u, y

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

Database Machine Performance Modeling Methodologies And Evaluation Strategies Lncs 257

Authors: Francesca Cesarini ,Silvio Salza

1st Edition

3540179429, 978-3540179429

More Books

Students also viewed these Databases questions

Question

1. Who will you assemble on the team?

Answered: 1 week ago