HW#1 --- last modified March 02 2019 21:22:20..
Solution set.
Due date: Sep 12
Files to be submitted:
Problems.pdf
ByeStringChecker.java
Purpose: To gain practice with UML modeling. To write
a simple command line program that could be developed from a state diagram
Specification:
Do problems 2.1 and 2.4 out of Jia's book. If you don't have the book
these are:
2.1 Based on your experience of using bank ATM machines,
precisely model the behavior of an ATM machine using
state diagrams. The state diagrams should describe at least
the following scenarios:
* Cash Deposit
* Cash Withdrawal
* Checking account balance
2.4 Develop an object-oriented model for the following
system: A university online system. The system should
allow students to browse courses offered by the university
and the schedule. The students will be able to add and drop
classes. The instructors will be able to get the roster of a
class and enter grades for each student in the class.
Submit these in the file Problems.pdf.
You can draw your diagrams by hand, scan and convert them to PDF. Then
write a program EmbeddedString.java in Java 5 which when run on the command line,
with a line like:
java ByeStringChecker hello byehellohellohellobye
Outputs `yes' if the second string consists of the word bye,
followed by a string which is zero or more repetitionss of the first
string,
followed by the word bye.
It outputs `no' otherwise. To receive points your
ByeStringChecker.java
should not make use of any String's, StringBuffer's, etc. methods beyond
charAt and length.
Try to represent the
problem using state diagrams and include these also in Problems.pdf.
Point Breakdown
Departmental coding guidelines for Java followed |
1pt
|
Problem 2.1 |
2pts
|
Problem 2.4 |
2pts
|
ByeStringChecker gets uses its two command line and does some test cases okay |
2pts
|
ByeStringChecker works correctly on all test cases |
2pts
|
State diagrams for ByeStringChecker |
1pt
|
Total | 10pts |
|