Class Diagram : Primary School (you can zoom it for the detailed view.) |
May 10, 2012
Day 2 : Class Diagram
This is my class diagram of the POJO classes so far, for the primary school. I used 'STAR UML' tool for drawing and generating the java code.You can download the tool from sourceforge.net for windows. I got an error in the principal class when I was generating the code; need to work on that later.
May 7, 2012
How to make a system in 25 days? ctd...
Utilizing the break...
I'm using java for coding.
Class Diagram
purpose: show the types being modeled within the system
Example of a class diagram for the class 'Flight' would look like this
Mapping a class diagram
- Packages - map to Java package names
- Classes - map directly to Java classes
- Interfaces - map to Java interfaces
- Attributes - map to Java properties and fields
- Associations, Aggregations, Compositions - map to Java references
- Operations - map to Java methods
- Generalizations - map to Java inheritance relations
- Attributes - map to Java properties and fields
- Attributes - map to Java properties and fields
- Realizations - map to implementation of Java interfaces
- Dependencies - at the most basic level these just map to Java import statements
UML Associations
Cardinality - a cardinality of one on a given relationship end generates a Java reference
Aggregation
Composition associations - child object can not exists with out the parent.when the parent is deleted child also is deleted when we implement in java.
Aggregation Association - same behavior as a regular association.
One to many association
resulting code for this is something like following.
Composition associations - child object can not exists with out the parent.when the parent is deleted child also is deleted when we implement in java.
Aggregation Association - same behavior as a regular association.
One to many association
resulting code for this is something like following.
public class Customer { List getPurchases() {...} void setPurchases(List purchases) {...} ... }
How to make a system in 25 days?
Day1 : Today's Ingredients
1. A midsummer Night's Dream Felix Mendelson (Music)
In case things get out of hand..
2 Creating Database & UML Diagrams
1....
2. Creating Database & UML Diagrams
First we need the database.
You have to scratch your tables and then normalize.
Basics! 3 Normal forms.
These are supposed to be just guidelines. Book says that It is sometimes necessary to stay away from these to implement requirements.
1st Normal Form
No duplicate columns in one table.
Create separate tables for related groups of data. IDentify each row with unique column/s- Primary Key.
1NF: more>>
2nd Normal Form
Remove duplicate data: 1NF should be applied already.
If there is same data are used in multiple rows of a table, create separate tables for those duplicated and make a single table out of that.
After applying the 1st normal form lets say there is a table like this:
Users table
- Address
- City
- State
- ZIP
Users table
- Name
- Address
- ZIP
- ZIP
- City
- State
Here it is the zip (primary key of zips)
2NF: more>>
3rd Normal Form
You should have already applied 2NF;
Columns should depend only on the PK and non other than the PK.
3NF: more>>
There are lot of things you want to do in a day, like learn french, do the rest of the system and go site seeing. So you got to choose..
BTW when you don't have a choice, you got to be sure about the shortest path!
So.. How to do a system in 25 days? and make it worthwhile for a one year project..
Well, I know lot of people have the same problem. Hang on then. LessDoIT!
BTW when you don't have a choice, you got to be sure about the shortest path!
So.. How to do a system in 25 days? and make it worthwhile for a one year project..
Well, I know lot of people have the same problem. Hang on then. LessDoIT!
Subscribe to:
Posts (Atom)