public static Boolean words(String []p,String []q)
{ boolean flag =true;
if (p.length=q.length) flag=false;
else
for (int i=0 ; i< p.length ; i++)
{ if (look(p,q))flag=false; break; } return flag;
}//words
public static boolean look(String []p,String w) { boolen flag = true; for (int i=0; i< p.length; i++)
if (p. equals(w))flag = false;
return flag;
}
}//Meth1
a) Work out and documentthe processes being carried out by the method "words" in the above class. Your documentation should include any data used for the purpose.
b) a client has an array of English words. What is required to list all those words from the array, which come alphabetically after the word "master", and they are to appear in alphabetical order. For example: given an array of words as shown below:
cast static thread make void import
should produce an array of words:
static thread void
Use inheritance to extend the class "Meth1" to produce the necessary method
I really think we should stop responding to the OP's posts. He/she has no forum ettiquette (if there is such a thing). He/she posts his assignments, is extremely messy. After supplying him/her with possible steps towards solutions and requesting that he/she be abit considerate and abide by the requested code format he/she continues to simply just copy and paste the code from whatever assignment web page his course is located at to this forum.
Not to be rude, but personally I won't be responding to any of his/her posts until the person makes his posts a little bit easier on our eyes.
sorry to cause you much probs but i got this questions from a friend and its was quite pale and i had to recopy it . Thus i certainly makes some mistakes. I will try to get the original.
What does that have to do with taking two minutes to indent your code and sticking in the appropriate pre tags to make your code a little more legible.
If we are able to take 5 minutes to read your post, you should surely be able to take two to ensure that your post is presentable and some what legible.
Yes, of course you just got this from "a friend." It was just something your "friend" was musing about and is not just a homework assignment typed in verbatim, of course.
You will learn a lot more by at least attempting to do your homework -- and when the test rolls around you won't be quite as clueless.
a) This "method," using the term loosly, in addition to illustrating poor coding style like the rest of the class by having a nearly meaningless name as well as meaningless variable names, also demonstrates the process used to generate a number of different compiler errors.
b) This is a trick question! Don't fall for it! It is impossible to inheritance on code that doesn't compile in the first place.