It is all about coding

All the description will be in the in the word document down here. All you will have to do is to follow the instructions
assignment6hints.pptx

programmingassignment6.docx

Don't use plagiarized sources. Get Your Custom Essay on
It is all about coding
Just from $13/Page
Order Essay

Unformatted Attachment Preview

Programming Assignment 6
Hints
Inheritance
• What?
– Inheritance is a paradigm in Object Oriented programming in
which attributes and functionality can be “inherited” from a
“parent” class by a “child class”
– Java (as most current high level languages) supports single
inheritance making an inheritance tree appear “upside down”
– Inherited methods may be overridden by the child’s
implementation. This may be restricted by the final keyword or by
making the parent methods private.
Inheritance (cont.)
• Why?
– Re-use. Why?
• Reusing implementations reduces required effort.
• Existing implementations may be thoroughly tested for stability and security
before being deployed for re-use by development teams.
– Implementation flexibility. Using a parent class reference to access
a diverse collection of child class objects.
– Easier to understand implementations.
Inheritance (cont.)
• How?
Parent Class
Why Override? Because
It overrides the Object class.
Overriding by a
child’s
implementation may
be inhibited with the
final keyword.
Method/attribute must be public or “protected” (default) to
be inheritable by a child.
Inheritance (cont.)
• How? (cont.)
Child
Parent
Parent Class
Child classes
More specific
Replace
implementation
Of Parent.
Constructor for Parent. Must be first
Line in Child constructor.
Use the “super.” notation to call a parent class’s
implementation of a method.
Interfaces
• What?
– Interfaces allow a class to implement functionality which is predefined as an interface.
– Interfaces are typically used in “-able” type application. I.e.
declaring functionality within a class that is orthogonal to the
definition of that class.
– Examples in the Java API are Runnable, Serializable, and
Comparable.
– Java allows a class to implement multiple interfaces but only single
inheritance.
Interfaces (cont.)
• Why?
– Re-use. Why?
• Standardized interfaces promote consistency within the project. The interface
definition may be determined once and re-used across a project.
– Software Security
• Ability to expose subsets of a class’s implementation defined by the interface’s
needs. Combined with Factory design patterns, this can be a very elegant
implementation.
– Multiple Interface Support
• A class may implement multiple interfaces which reduces the need for multiple
inheritance.
Interfaces (cont.)
• How? (cont.)
Similar to Class declaration in syntax.
Methods are declared but contain no implementation.
Added in Java 8, the default keyword allows implementations to be added to a interface which can
be very helpful when updating deployed interfaces.
Interfaces (cont.)
• How? (cont.)
Implementation of methods
defined in the interface.
Interface to be implemented.
What about the Hints?
How do I count the number of words in a passage of text?
How do I count the number of times a phrase appears?
CSIS 212 Programming Assignment 6
At this point, your application contains an organized, functional model of the text of the Bible as was as
the ability to populate it from an encoded text file. However, as is common with most software projects,
refactoring is a necessary part of the process. There are many aspects to re-factoring but one common
one is eliminating redundant code. Doing so often reduces the application’s complexity, making it easier
to debug and maintain.
Part 1 (15 points):
In this project, we notice that every class in the biblemodel package has a field called “id” and a method
called “getId()”. The first part of this assignment is to re-factor this functionality into a base class named
BibleObject which implements the initialization of “id” in the constructor. The method “getId” should be
created in BibleObject and removed from the other classes in the biblemodel package. The classes Bible,
Book, Chapter, and Verse will all inherit from BibleObject. Done correctly, you should not need to
override the getId() in the child classes but should be able to inherit the base class implementation
directly.
Part 2 (25 points):
A user may wish to count the number of words in a verse, chapter, or book as well as count the number
of occurrences of a particular word or phrase. That goal is the focus of part two of the assignment.
1. Construct an Interface name BibleStats and place it in the biblemodel package.
2. In this interface create method prototypes as follows:
a. int wordCount();
b. int wordCount(String word);
wordCount() will return the number of words in the Bible, Book, Chapter, or Verse it is called on.
wordCount(String word) will return the number of occurrences of the word or phrase passed in
as an argument.
Part 3 (10 points):
1. In the test package, construct a BibleTest class with a main method that exercises the
functionality of these new features. Note that you may add functionality to your classes to make
this easier if you wish.
2. UML class diagrams generated with easyUML (or other). Diagram must show interface and class
hierarchy.
BONUS (20 points):
While searching and counting for the occurrences of a word or phrase in the Bible has some usefulness,
it really is incomplete without also reporting where the occurrences are. The bonus part in this
assignment requires you to add a method to your interface to return a list of all the locations of the
word or phrase along with the matched verse. Searches must support the entire Bible or a single book
specified by the user. Note that your implementation must protect against user errors such as entering
invalid data, chapters out of range, etc.,
Deliverables:
1. Working project with JavaDoc documentation as necessary.
2. UML Class diagrams (may use easyUML or other to generate).

Purchase answer to see full
attachment

GradeAcers
Calculate your paper price
Pages (550 words)
Approximate price: -

Why Work with Us

Top Quality and Well-Researched Papers

We always make sure that writers follow all your instructions precisely. You can choose your academic level: high school, college/university or professional, and we will assign a writer who has a respective degree.

Professional and Experienced Academic Writers

We have a team of professional writers with experience in academic and business writing. Many are native speakers and able to perform any task for which you need help.

Free Unlimited Revisions

If you think we missed something, send your order for a free revision. You have 10 days to submit the order for review after you have received the final document. You can do this yourself after logging into your personal account or by contacting our support.

Prompt Delivery and 100% Money-Back-Guarantee

All papers are always delivered on time. In case we need more time to master your paper, we may contact you regarding the deadline extension. In case you cannot provide us with more time, a 100% refund is guaranteed.

Original & Confidential

We use several writing tools checks to ensure that all documents you receive are free from plagiarism. Our editors carefully review all quotations in the text. We also promise maximum confidentiality in all of our services.

24/7 Customer Support

Our support agents are available 24 hours a day 7 days a week and committed to providing you with the best customer experience. Get in touch whenever you need any assistance.

Try it now!

Calculate the price of your order

Total price:
$0.00

How it works?

Follow these simple steps to get your paper done

Place your order

Fill in the order form and provide all details of your assignment.

Proceed with the payment

Choose the payment system that suits you most.

Receive the final file

Once your paper is ready, we will email it to you.

Our Services

No need to work on your paper at night. Sleep tight, we will cover your back. We offer all kinds of writing services.

Essays

Essay Writing Service

No matter what kind of academic paper you need and how urgent you need it, you are welcome to choose your academic level and the type of your paper at an affordable price. We take care of all your paper needs and give a 24/7 customer care support system.

Admissions

Admission Essays & Business Writing Help

An admission essay is an essay or other written statement by a candidate, often a potential student enrolling in a college, university, or graduate school. You can be rest assurred that through our service we will write the best admission essay for you.

Reviews

Editing Support

Our academic writers and editors make the necessary changes to your paper so that it is polished. We also format your document by correctly quoting the sources and creating reference lists in the formats APA, Harvard, MLA, Chicago / Turabian.

Reviews

Revision Support

If you think your paper could be improved, you can request a review. In this case, your paper will be checked by the writer or assigned to an editor. You can use this option as many times as you see fit. This is free because we want you to be completely satisfied with the service offered.

Order your essay today and save 15% with the discount code DISCOUNT15