Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using the Concordance program again, carry out the following experiments. For each experiment carry out the specified task and answer the associated questions as needed.

Using the Concordance program again, carry out the following experiments. For each experiment carry out the specified task and answer the associated questions as needed. For any experiment that fails (gets a compilation error), undo the change before proceeding with the next expe1iment.

(a) Tn the class Conca rda n ce change its supcrclass from Has hMa p to Has hta b l e. Then recompile and rerun Concordance. Has anything changed? Why or why not? Explain.

(b) In the call to add in the Document class, remove the first argument's cast to String, and in the declaration of add in the Con co rda nee class, change the type of word from String to Object. Then recompile and rerun Concordance. Has anything changed? Why or why not? Explain.

(c) In the call to add in the Document class, eliminate the conversion of the value of number to Integer (via the newlnteger(number)), and in the declaration of add change the type of the parameter line from Integer to i nt. Then recompile and rerun Concordance. Has anything changed? Why or why not? Explain.

(d) In the Report class, change f. next() to f. next. toStri ng( ), then recompile and rerun Concordance. Has anything changed? Why or why not? Explain.

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

Design Operation And Evaluation Of Mobile Communications

Authors: Gavriel Salvendy ,June Wei

1st Edition

3030770249, 978-3030770242

More Books

Students also viewed these Programming questions