Workshop 2 Encapsulation and abstraction

Original price was: $35.00.Current price is: $30.00.

Rate this product

Workshop 2
This assignment lets you practice basic concepts such as encapsulation and abstraction.
A palindrome is a word, phrase, number, or other sequence of characters which reads the same
backward or forward. Stack is a simple data structure/container which acts as LIFO (last element
in, would be the first element out.)
In this assignment, first, develop a Stack class. Second, develop a second Java class named
Palindrome that in its main method, receives a string as a command-line argument, and then
uses a Stack object to check whether the given string is a palindrome or not.
Please note the following regarding doing this workshop:
1 – You should implement your version of Stack class (Use this link if you need)
first. You should not use Stack class in Java API. Objects based off our Stack class
just know how to push and pop characters, one at a time. Your Stack class should be
a reusable entity and doesn’t need to know any of the logic that you are going to put in the
second class.
2- Based on the specs for this workshop, your solution should be dealing with a sequence
of characters and thus, backed by a char array (as its storage.) Please note that since
we have not yet talked about ArrayLists, you should use an array. In case you like
to new/initialize your array based on the size of the command-line argument’s size, you
could do it so through a constructor in your Stack class.
Marking Criteria and Task:
Please note that you should:
a- have appropriate indentation.
b- have proper file structures and modularization.
c- follow Java naming conventions.
d- document all the classes properly.
e- not have debug/useless code and/or file(s) left in assignment.
f- have good intra and/or inter class designs.
in your code!
• Task: Developing and running the desired solution: (you should submit your source
code – just individual .java files and screenshots which demonstrate the way your
code runs in different scenarios): 5 marks.
JAC444 Summer – 2022 2
05/2022 Workshop 2 Page 2 of 2
Deliverables and Important Notes:
• You are supposed to submit your solution online on BB by the end of the day on
Tuesday, 7
th of June 2022.)
• Please note that you would be allowed to submit just once, so please be super
careful and double check before you hit submit.
• There would be a 20% penalty for each day (or part of it,) in case you submit
• Remember that you are encouraged to talk to each other, to the instructor, or to
anyone else about any of the assignments, but the final solution may not be copied
from any sources.


There are no reviews yet.

Be the first to review “Workshop 2 Encapsulation and abstraction”

Your email address will not be published. Required fields are marked *

Scroll to Top