Modify the polymain class to create at least one of phonbook

Assignment Help Basic Computer Science
Reference no: EM13782803

Inheritance and Polymorphism

1.Key in the PolyMain, Book, Almanac, and Novel classes defined in this module of the course. Once you get each of these classes keyed in, make sure they compile and execute properly. Then create a third subclass called Phone that also extends the Book class. The Phone class should keep track of the number of yellow pages and the number of white pages in each phone book. Make sure the Phone subclass you create has a print method having the same signature as the print method in the Book class. The print method from the Phone class should print the title of the book, followed by the number of yellow pages and white pages contained within the phone book. Thus, the print method should have the following signature:
public void print();

The Phone class should also have a constructor having the following signature:
public Phone(String title, int whitePages, int yellowPages);

This constructor should sum up whitePages + yellowPages to get the total number of pages in the book. Remember the total pages in the book and the title of the book are set in the constructor for the Book class.
Modify the PolyMain class to create at least one of your phone books and store it in the library. You should now be able to print the library without having to modify the print method defined within the PolyMain class.

2.You may use any Java IDE you choose to develop your source code, compile and link your code, and execute your program (jGRASP is recommended). Or you may use the Windows Command Prompt.

3.You are to submit the following deliverables in a single Microsoft Word file in this order, and clearly labeled.

·A screen snapshot of your Java source code (all file(s) shown separately) displayed in the IDE or Windows editor showing a successful compilation, if possible (only the beginning of the source file(s) is necessary).

·A listing of your entire source code file(s).

Unzip the zip file

·A screen snapshot of all of your program's outputs for the specified values in Step #1. Failure to show all of the output will result in lost points. In order to not confuse the grading process, and possibly lose points, do not include any other outputs aside from what is requested.

Your instructor will compile and run your program to verify its correctness.

You will be evaluated on (in order of importance):

·Following directions, and inclusion and packaging of all deliverables in Step #3.

·Correct execution of your program (this includes proper compilation). This also includes getting the correct answers!

·Proper commenting of your Java code and indentation (as specified in the text).

·Neatness in packaging of your deliverables (including putting the items in Step #3 in the correct order).

Reference no: EM13782803

Questions Cloud

Explain why depositing cash into a checking account : Describe one reason why the flexibility of wages and prices tend to favor the Keynesian economic view in the short run and one (1) reason why the flexibility of wages and prices tend to favor the classical economic view in the long run.
Strategic marketing process paper : How does the marketing mix help businesses create market segments? How does this in turn help to create customer loyalty?
Problems related to respiratory hazards : Provide a brief explanation of each hazard and describe a situation in which you may encounter them.
Let me not to the marriage of true minds : "Let Me Not to the Marriage of True Minds" is an example of which type of poem?
Modify the polymain class to create at least one of phonbook : Key in the PolyMain, Book, Almanac, and Novel classes defined in this module of the course. Once you get each of these classes keyed in, make sure they compile and execute properly.
In what ways are characters differentiated from one another : In what ways are the characters differentiated from one another? Looking back at the story, can you see why Tessie Hutchinson is singled out as the "winner"?
Disadvantages of the s.a.r. versus the a.p.r. : What are the advantages and disadvantages of the S.A.R. versus the A.P.R.?
Sharing of household work : Respond to the following questions: Among twin- income and dual-career families, do you think there will ever be an equal sharing of household work? Why or why not?
Source of energy for the body : 1. Which one of the following nutrients is not a source of energy for the body?

Reviews

Write a Review

 

Basic Computer Science Questions & Answers

  Write a program that reads in an integer

Write a program that reads in an integer, and breaks it into a sequence of individual digits. For example, the input 16384 is displayed as 1 6 3 8 4 You may assume that the input has no more than five digits and is not negative

  Write a program that converts a line of data

Write a complete program that reads three num- bers, adds 3.14 to each of them, and writes the result to the standard output stream if the result is greater than 10 - Write a program that converts a line of data containing three integers.

  True and false

A.  (True | False) In the MSP430's active mode, the MCLK and SMCLK clocks are up and running and ACLK is not running (it is turned off).

  Facebook and privacy issues

Smartphones and Teenagers • Facebook and Privacy Issues • Challenges of Sport Organisations in Australia

  Passing an "in out" parameter to a procedure

In Ada, when passing an "in out" parameter to a procedure, the system is allowed to use either pass-by-reference or pass-by-value-result as it sees fit. Why?

  Explain utilitarian theory tells us about the morality

What do you believe utilitarian theory tells us about morality of such questions as abortion, capital punishment, or euthenasia? Is utilitarian theory helpful in deciding these questions?

  Find the second plain text

Find the second plain text x2 - Can somebody provide the answer for given question with example?

  16-bit signed magnitude numbers

Convert the following numbers to 16-bit signed magnitude numbers (display results in hexadecimal):

  Describes the movement of inventory

Create a decision table that describes the movement of inventory and draw a decision tree that describes the merchandise inventory management process.

  Support desktop computers in small company

Static IP address of server is 192.168.45.200. Employees will open their Web browser and enter personnel.mycompany.com in URL address box to browse Web site.

  What would say in a job interview

What would say in a job interview if you were asked to comment on the following statement: "A Database Administrator (DBA) should create as many indexes as possible for a table because that will result in the greatest speed for all operations ..

  Determine difference between repeated set of measurements

By this time you are prepared, I trust, to determine that there would be some difference between, two averages. What must we do in such a case?

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