Domain Modeling (Modeling the App)

--Originally published at diegotc2016

What are the things in the application that we need to be aware of?

Identifying the Classes

We will use the scenarios in order to identify the objects, you can highlight the main classes that are written in the use story. For example:

Scenario: The coach gets into the “Sports Statistics and Performance Improvement” either in his laptop or in a mobile phone. Then the coach selects the sport he wants to evaluate, afterwards the coach types the name of the athlete and the computer will ask for the height, weight, % muscle, % fat, gym performance and sport performance of the athlete. The program will automaticlly display a gym routine based on great nutriologists, a gym routine based on excellent trainers and sport tips for the athlete based on outstanding athletes. If the athlete works well he/she will improve for his/her team

Don’t worry if you miss one or more objects, this is just the begining

Identifying Class Relationships

Taking it back to the last post I’ve made, I got this image.

Domain Modeling (Modeling the App)

The relationships are simply the arrows and it says for example, that if wine was consumed they must pay for wine

Identifying Class Responsabilities

You should highlight again the verbs of the classes. I can show you this point by taking again this example:

Scenario: The coach gets into the “Sports Statistics and Performance Improvement” either in his laptop or in a mobile phone. Then the coach selects the sport he wants to evaluate, afterwards the coach types the name of the athlete and the computer will ask for the height, weight, % muscle, % fat, gym performance and sport performance of the athlete. The program will automaticlly display a gym routine based on great nutriologists, a gym routine based on excellent trainers and sport tips for the athlete based on outstanding athletes. If the athlete works well he/she will improve for his/her team

Always remember that a custmer must be responsible by itself and it can also be responible for other objects. There can be a lot of responsabilities for one simple class.

Using CRC Cards

First of all CRC stands for Class Responsability Collaborators, its main objective is to order the classes. Each card is for one class. A CRC card is written as it follows.

Class Name

Responsabilities Collaborators

A CRC card must be written in paper and not in a digital way because by writing it in paper it makes you more concise and you kind of remember better when you write.


Domain Modeling (Modeling the App)

Utilizing Use Cases

--Originally published at diegotc2016

Understanding Use Cases

Now we’re going into a user focus. For getting a use case we need:

  • Title: What is the Goal?
  • Actor: Who desires the Goal?
  • Scenario: How the Goal is accomplished?

How to make a Title?

Use a short phrase that has an active verb in it. For example:

Purchase Items

Utilizing Use Cases

Identifying the Actors

An actor isn’t necessary a User, it can be a Customer,  a Member, or an Administrator. As well an actor isn’t neccesary a human being, it can be for example a System.

An actor is a anything that has behavior and  interacts with your system without being in your system. As I said before this post this can be a human being or not.

As well as on the movies, there are primary and secondary actors, but the name doesn’t have to be wether one is more important that other. The primary actor is the one that begins the process.

External Systems / Organizations

External data sources, web services, other corporate apps, tax reporting

Roles / Security Groups

Visitor, members, administrator, owner

Job Titles / Departments

Manager, payroll administrator, production staff, executive team, accounting

Identifying the Scenarios

An Scenario is simply a way in which an actor interacts with a program. For example:

Title: Getting players’ data

Actor: The Team’s Coach

Scenario: The coach gets into the “Sports Statistics and Performance Improvement” either in his laptop or in a mobile phone. Then the coach selects the sport he wants to evaluate, afterwards the coach types the name of the athlete and the computer will ask for the height, weight, % muscle, % fat, gym performance and sport performance of the athlete. The program will automaticlly display a gym routine based on great nutriologists, a gym routine based on excellent trainers and sport tips for the athlete based on outstanding athletes. If the athlete works well he/she will improve for his/her team

You have to tell how an actor interacts with an app in a coloquial way. It can be also written in steps.

Purchase Items

Create new document

Balance Accounts

Utilizing Use Cases

Log in into the app

Write book

Merge organizations

Utilizing Use Cases

Diagraming the Use Cases

Is a UML graphic representation of several use cases and actors that interact at the same time. A Use case looks like this:

Utilizing Use Cases

The stick man are the main actors that are in the Boundary system. Then write the main actions or scenarios, those are the circled ones. As you can notice there’s a box in this picture, everything inside the box is part of the system, you can also identify that all the actors are’nt in the system itself. Also a non human actor can be represented just as a box.

Employing Use Stories

It is simpler and shorter than a use case, but it still describes an scenario. It is written like this:

As a (type of user) Bank Customer

I want (goal) to change my PIN online

so that (reason) I don’t have to go into a branch


Utilizing Use Cases

Object Oriented Analysis and Design

--Originally published at diegotc2016

Understanding the object-oriented analysis and design processes

There’s a process in order to identify the classes in an application.

  1. Gather Requirements: What’s the program you trying to solve? What does the app do?
  2. Describe the app: Write in a coloquial way how people use the app. You could create a mockup or a prototype of the app.
  3. Identify the main objects: With the two last points you’re trying to get the most important ideas that are essential for the app to work.
  4. Describe the Interactions: Specify how one class interacts with another. For example: A  customer opens his/her bank account.
  5. Create a class diagram: A visual representation of the classes you need

Object Oriented Analysis and Design

Defining Requirements

There are two types of requirements:

  • Functional: What does it do? Features and Capabilities. For example: Application must allow user to search by customer’s last name, telephone number and order number.
  • Non-Functional: What else? Help, Legal, Performance, Support  and Security. System must respond to searches within two seconds.

FURPS/FURPS+

Functional Requirements

Usabilitity Requirements

Reliability Requirements

Performance Requirements

Supportability Requirements

+ Design Requirements, Implementation Requirements, Interphase Requirements, Physichal Requirements.

Introduction to the Unified Modeling Language (UML)

The UML isn’t a programming language, it is a graphical notation for drawing diagrams of an object oriented system

  • Name of the class: BankAccount
  • Attributes: accountNumber, balance, dateOpened, accountType
  • Behaviors: open(), close(), deposit(), withdraw()

 


Object Oriented Analysis and Design

WSQ07-Babylonian Method

--Originally published at diegotc2016

Doing this wsq was more or less difficult for me because I’m still having problems with the syntaxis of Java. First I tried to “translate” my old code in Python to Java, but my program didn’t work, but I finally got the code right.

Here’s a video that helped me for this WSQ:

I tried to do the WSQ using this guy method but the console displayed an error

Here’s my code in Eclipse using as an input number 36:

WSQ07-Babylonian Method

WSQ07-Babylonian Method

Here’s my code in Github:https://github.com/diegoalatorre/TC2016meromero/blob/master/WSQ07.java

WSQ07-Babylonian Method

 


WSQ07-Babylonian Method

#WSQ06-Greatest Common Divisor

--Originally published at diegotc2016

Doing this WSQ was more or less easy for me, the only difficult part was that I didn’t remember how to do the greatest common divisor of two numbers, so I searched in youtube for an example. The other difficult part was the java syntax, I’ve programmed in python for a year and learning java is becoming a challenge for me but I’m getting better

Here’s the code In Eclipse:

#WSQ06-Greatest Common Divisor

#WSQ06-Greatest Common Divisor

Here’s the code in GitHub:

*****

Here’s the video:


#WSQ06-Greatest Common Divisor