Patterns covered so far in class:
Do this assignment with pair programming. Two people, one typing at the computer.
Each member of the team will submit the solution via their class
webspace, but the work will be jointly done.
Put your source code files on the web so I can look at
them with a browser.
TBA.
Do this assignment as a project team.
Complete your user story document and put it on your class work webpage. This collection will serve as your requirements for the online voting system design. Use the two class discussions we had as guidance for the different functions the system must provide to the different kinds of users.Each team will create one document, and each team member will link the document to his/her webspace. Make sure the document identifes both (all) team members.
Do this assignment with pair programming. Two people, one typing at the computer.
Each member of the team will submit the solution via their class
webspace, but the work will be jointly done.
Put your source code files on the web so I can look at
them with a browser.
Produce a program in Java or C++ that uses factories to generate objects, and a composite pattern to organize them. The structure you should create is a ballot for handling elections at any number of multiple levels (e.g., national, state, local). Use the example Java code we have done in class as a guide. Follow the more complicated example for the drawing canvas; I want you to clearly define the interfaces that create the common operations for the leaf and inner nodes of the composite. Make your composite interface have at least three common methods (3 or more methods that are provided by both inner and leaf nodes). I will leave it up to you to design an appropriate collection of ballot-related operations. The main thing to remember is the point of the composite: for the common operations, the leaf level and the inner levels look the same.
You will also need some client code to build and exercise the composite structure. In this case, the client code will simulate at a very high level an election... creating ballot(s) and using them to cast votes.
Provide some documentation on the web page that explains your solution to the problem, specifically the operations you put into the common interface. Also document how to run the program... what input to provide, and a description of what sort of output is generated.
We will work as two-person teams on some of the assignments in this course. If you want to form a team with a classmate please email me the two names.
For anyone who does not form your own team, I will make assignments after the due date above.
Use ML to express the axioms you write. Using ML will also allow you to check the behavior to see if you have expressed what you intended.
Using Guttag's hueristic, give consistent and complete algebraic specs for this ADT (class):
LIB (library)
new: -> LIB
add: LIB x BOOK -> LIB
rem: LIB x BOOK -> LIB
cko: LIB x BOOK x PERSON -> LIB
cki: LIB x BOOK x PERSON -> LIB
wait: LIB x BOOK x PERSON -> LIB
off: LIB x BOOK x PERSON -> LIB
has: LIB x BOOK -> boolean
here: LIB x BOOK -> int
num: LIB x BOOK -> int
new makes a LIB with no books, no wait lists, etc.
add puts another copy of a book in the library
rem takes a copy out of the library
cko allows a person to check out the book
cki checks the book back in;
if there is a person on wait list it does a cko to that person.
wait puts person at the back of a waiting list for a book
off takes a person out of the waiting list for a book
has tells if a book exists in the Library (even if all copies are
checked out
here tells how many copies of a book are available for checking out
num tells how many copies total of a book exist in the library
You can use string for PERSON. Use int for BOOK (like a simplified ISBN).
When picking the canonical constructors, consider the data structures that must be kept internally by the library. Some canonical constructor will be needed to build each of these structures.
Hand in your work via the website you are keeping for the class, the one you sent me the URL for in assignment A2. Do it similar to this web page and this example, meaning make me a web page with a link to the text of each ADT in ML
Email to me a URL for a web page that you will keep for this class. On this web page please put your name and email adddress. Then add links for your work as the semester progresses. The page will include links to your individual work, as well as to the work you do as a team.
Answer this question: What is software design?
I am not looking for pages, but I would like you to give it enough thought that you can answer with a good paragraph or two. Prepare this answer for the next class. Email it to me by the time I have indicated so I can take a look before the next class, and so you will be prepared to discuss this next time.