Input data analysis, C/C++ Programming

Create a class Word, representing a word. Two words should be considered equal if they consist of the same sequence of letters and we consider upper case and lower case as equal. For example hello, Hello and HELLO are considered to be equal. The methods equals and hashCode de ne the meaning of \equality". Thus, the class Word should look like the following.

public class Word implements Comparable {
private String word;
public Word(String str) { ... }
public String toString() { return word; }
/* Override Object methods */
public int hashCode() { "compute a hash value for word" }
public boolean equals(Object other) { "true if two words are equal" }
/* Implement Comparable */
public int compareTo(Word w) { "compares two words lexicographically"}
}
Note:
 If you want, you can add more methods. The methods mentioned above are the minimum requirement.
 Task 6 and onward is based on task 5. Thus, carefully test all methods before proceeding.

Posted Date: 3/14/2013 6:25:11 AM | Location : United States







Related Discussions:- Input data analysis, Assignment Help, Ask Question on Input data analysis, Get Answer, Expert's Help, Input data analysis Discussions

Write discussion on Input data analysis
Your posts are moderated
Related Questions
write a program that counts the number of occurences of the string in the n-th Padovan string P(n) program in java // aakash , suraj , prem sasi kumar kamaraj college progr

Comments Comments are integral part of every program . Comments help in coding, debugging and maintaining a program . The compiler ignores them. They should be used liberally i

Use of random function: int main(void) {    int i,j;         for(j=0;j       {      // randomize();       for(i=0;i                  printf("%d\n", ran

c program to count the number of occurances of the string in padovan''s string


(c) A static member function can access static member data only, static member functions and functions and data outside the class. A static member function may be called, even whil

Define Register Variables - Low Level Programming? The Register variables are a special case of an automatic variable. The Automatic variables are allocated storage in the memo

I need to implement a mini version of linux''s ''tar'' function in C.

WAP TO PRINT THE LARGEST NUMBER FROM ANY 10 NUMBERS #include stdio.h> #include conio.h>   void main()   {                    int a[10],i,max;

Write a program to create a binary file and store the following data "hello", 0x0030,'1', 1.234  Using visual studio examine the binary file and note how the day is stored   Answe