#WSQ11-Library

--Originally published at Blog

And this is the most boring wsq that I have ever done!
Because all it asked of me was filling the blank methods with just some return statements in most cases.
The most interesting I did in this assignment was doing a for loop and throwing some exceptions.

So i entered the WSQ11 blog post in kenscourses and clicked the first link because I’m too lazy to read.
And the first thing I notice is that I don’t know what to do here, obviously, instead of go back and read the instructions I started doing the first assignment.
#WSQ11-Library

After some dedication and hard work doing that thing about gravity I realized it was too stupid, so I deleted all the files, including System32.

So now I had the tough task of reading the instructions.
According to the English dictionary of Cambridge, the word “to” is pronounced as “tu”.
The instructions said that I should try to “tutu” the Library assignment.
#WSQ11-Library

All I did in the book class was add some fields, getters and setters.
#WSQ11-Library

And in the Library class I just used the Book class to create the simulation of a library.
It also asked me to create a static method, I was so excited.
#WSQ11-Library

After that I kept reading and clicked on a link, and the first thing a saw was a big message saying “Buy my book!”, it was so gross that I had to leave the site.
#WSQ11-Library

github


#WSQ11-Library

Creating Classes

--Originally published at diegotc2016

Creating Class Diagrams

We have to use a UML Diagram, which is written like this:

Creating Classes

Creating Classes

The – and + means that if it is private of public method, – is private and + is public.

Converting Class Diagrams into Code

Let’s make a example to demonstrate this:

This is my first time doing this so know that I might be wrong.

FootballPlayer

+position: String

-benchReps: Integer

+power(): String

+morePower(Integer)

Creating Classes

Exploring Object Lifetime

Making an object so that we can use the object is called instantiation. You create an object in Java by doing this:

Creating Classes

Constructor is a special method that exists to construct the object. The constructors are still part of the instantiation of the object. You can make a constructor on Java by making a method in the class with the same name of the class, for example:

Creating Classes

We also have descructor or a finalizer which are used when an object isn’t needed any more.

Using Static or Shared Members

Static in programming means that it never changes and it could be used in back accounts for example:

Creating Classes

The interest rate is the same for every bank account it doesn’t matter if the account is from Alice, Joe or Sam.

This is how static will look in java:

Creating Classes

If you want to access to an attribute of an object you type first the name of the object and then the type of attribute, for example: samAcct.accountNumber.

However if you want to acces to a static object you type first the name of the class and then a dot and then the name of the static object, for example: SavingsAccount.interestRate

You can also create a static method by just adding the word static in it, static method can only work with static variables. Static objects or methods are identified in UML diagrams by underlined words.


Creating Classes

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)

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

Project update #01

--Originally published at Blog

the team members are:

  • Hermes Espínola González
  • José Andrés Choza
  • Juan Salvador Fernández
  • Gerardo Cruz

The idea of the project is create a video game where the objective is fight in an arena.
Due to the fact that we don’t know anything about 3D modeling and animation, we will use creative commons assets from the unity asset store.
We have already implemented the movement of the character.

Project update #01

For the artificial intelligence we will be using a plugin for unity called RAIN. We are reading the documentation and trying to create our first AI character.


Project update #01