Version 6 (modified by boyan, 16 years ago) (diff) |
---|
Analysis
Overview
Manipulating with books is the main goal of sophie2. A book should hold pages, pages can be added or removed from a book. A book should be viewable, savable, exportable.
Task requirements
- Define the connections between books and other related objects (pages, some book repository)
- Define actions related to books
- for the book itself
- create
- destroy
- copy
- save/load
- export
- import
- for the objects inside
- add pages
- remove pages
- (re)order pages
- group pages in chapters
- set a page to be the cover of the book
- other actions
- merge two/many books in one
- split a book in two/many
- for the book itself
- Decide which connections and actions are basic and obligatory and which are optional. Define a class hierarchy that supports the basic connections and actions. In this task a class hierarchy for books should be created. It should contain all interfaces, classes, fields common for all possible kinds of books (if any more than one)
Task result
- The result should include
- class diagrams
- source code
Implementation idea
- first identify the classes and the relations between them
- implement the hierarchy
- implement the functionality
Related
BASE_MODEL_PAGE_ELEMENTS_R0
BASE_PERSISTENCE_COMMONS_R0
BASE_PERSISTENCE_INTERMEDIATE_STORAGE_R0
How to demo
- show the class diagram and explain the role of the components and how they are related
- show where the implemented packages and classes are
Design
The Book object model consists of three parts:
- Model - in package org.sophie2.base.model.book
- View - in package org.sophie2.main.view.book
- Logic - in package org.sophie2.main.view.logic
The basic actions for books are found in the following classes:
Book.java
BookView.java
BookLogic.java
- These classes provide functionality for:
- Creating and deleting books.
- Adding/removing/reordering the pages of a book.
- Some things will not be implemented in this task:
- copying books requires the CORE_ADDITIONS_R0.
- saving/loading books will be implemented in the BASE_PERSISTENCE_COMMONS_R0 task.
- importing/exporting will be implemented at Iteration05 - then there are tasks for that.
- grouping in chapters is scheduled for Iteration06.
- other things might be implemented in the next revisions of this task.
Here's the class diagram for these classes:
Unit tests can be found here:
BookUnitTest.java
PageUnitTest.java
AppBookPageLogicUnitTest.java
BookViewUnitTest.java
Implementation
(Implementation results should be described and linked here (from the wiki or the repository))
Testing
Comments
(Write comments for this or later revisions here.)