The waterfall method

The waterfall method was the first Software Development Cycle Model used widely in Software Engineering. In this method, the process of software development is divided into separate phases, the outcome of one of phase acts as the input for the next phase sequentially.

A representation of different phases of waterfall model.

SDLC Waterfall Model

The phases of the waterfall method are:

1. Requirement Gathering & Analysis: Ask the client what their needs and expectations are.
2. System Design: Requirements for the System and Hardware specification to define overall architecture.
3. Implementation: Program is developed in small units and tested (Unit Testing).
4. Integration and Testing: All units are put together and tested for faults and failures.
5. Deployment: After functional and non functional testing, the product is delivered.
6. Maintenance: Regular updates and issue resolving.

The advantages of using the Waterfall Method are:

  • Is easy to comprehend
  • Allows for departmentalization and control
  • Each stage can have a predetermined due time

 

 

Although, it has the disadvantage of being unable to go back if one of the steps has a mistake that was discovered in the next stages.

Tech Target. (2016). waterfall model. August 8th, 2016, from Tech Target Website: http://searchsoftwarequality.techtarget.com/definition/waterfall-model

http://www.tutorialspoint.com. (2016). SDLC – Waterfall Model. [online] Available at: http://www.tutorialspoint.com/sdlc/sdlc_waterfall_model.htm [Accessed 12 Sep. 2016].

Advertisements

Software Configuration Management

Geometric decorationStatistics:

  • 53% of software projects overrun their schedules and budgets
  • 31% are cancelled
  • Only 16% are completed
  • Projects made by large American software companies approximate to only 42% of clients’ requests.

Source: Keyes, J. (2004). Software Configuration Management. Boca Raton: Auerbach

SCM basic tasks:

Development and production of:

  • Configuration identification
  • Configuration change control
  • Configuration status accounting
  • Configuration auditis

Integration: consists on putting together the individual software parts in one single big project.

Types:

  • Merge: parallel development on the same stuff
  • Assembly: development of different pieces

Resultado de imagen para software configuration management

Software Configuration Management started in the 1950s, when configuration management, that was used for hardware and production control, was applied in software development.

Nearly all components that comprise modern information technology, such as Computer Aided Software Engineering (CASE) tools, Enterprise Application Integration (EAI) environments, Extract/Transform/Load (ETL) engines, Warehouses, EII, and Business Intelligence (BI), contain a great deal of metadata as well as his own repository and designer. That’s why metadata CM activities must be used in order to have effective information management.

The purpose of Software Configuration Management is to establish and maintain the integrity of the products of the software project throughout the project’s software life cycle. Software Configuration Management involves identifying configuration items for the software project, controlling these configuration items and changes to them, and recording and reporting status and change activity for these configuration ítems.

Configuration Management is practiced in one or another form as part of any software engineering project where several individuals or organizations have to coordinate their activities.

Software Engineering Institute. Capability Maturity Model Integration, Version 1.1 CMMI for Systems Engineering and Software Engineering (CMMI-SE/SW, V1.1) (CMU/SEI-2000-TR-018, ADA388775). Pittsburgh, PA: Software Engineering Institute, Carnegie Mellon University, 2000.

The reason for using SCM system is to keep track of the changing entities of a software product in a non degrading state. It provides the framework for interfacing different activities and defining the mechanisms necessary for coordinating parallel activities of different groups.

Software Configuration Management (SCM) A Practical Guide. http://energy.gov/sites/prod/files/cioprod/documents/scmguide.pdf

Best Practices: There are many practices that are advised to achieve proper SCM. What this implies is that just using SCM isn’t a solution, as SCM can be done poorly. Poor SCM won’t provide the results or benefits that one may expect. The first point is to make sure to store your important data in a secure place. Apart from storing the important files, one should also save who made what, when, and save previous versions of the modified file. A common technique that makes the process easier is to break the project down into components. Components are simpler by themselves and allow programmers to work in different parts of the project at the same time. A task that isn’t done by SCM software is to keep track of which versions work together. This means that, if a file in version 3 only works with version 2 of some other file, you have to keep track of the working version.

What Is Software Configuration Management? From: https://www.pearsonhighered.com/samplechapter/0321200195.pdf

Team members:

Andres Barro Encinas A00226225 @A_00226225

Hermess Espínola González A01631677 @herm13s

Miguel Miranda Plascencia A01631246 @mmiranda_96

Gerardo Cesar Juarez Lopez A00226860  @geratrex

Project Update #4

So we’ve finished the tutorials and we will start creating our own game.

As a reminder, our objective in the course is to explore and learn about the Unity engine, game logic and how game objects work.

In the last couple of days we implemented a system to create different tanks in the same scene, the logic to control the game flow and audio mixers.

The tank manager is a script that controls that instantiate a tank in the scene, setting its new color, and defines several methods to modify the behaviour of the tank, like disabling control.TankManager.png

The Game Manager is a script that controls the game (duh), setting the targets for the camera (because there could be different number of tanks), and have different functions that are executed based in the current state of the game (i.e.: starting a round, playing, finishing). We can archive this thanks to coroutines, which are functions that can pause its execution and return to the normal flow of unity (updating the frame, etc.) and then continue executing where it left.GameManagerCode.png

So the Game Manager just defines the number of rounds to win, the delay time to start (a countdown), controls the targets of the camera, instantiates the tanks and the Manager also keeps track of the state of the tanks (to finish the game when there is only one tank left in the scene).

GameManager.png

The starting delay just shows the text “tanks!”.

Text.PNG

The audio mixer is just like a filter to all the audio sources that the game have, you can just create one in the project folder.CreateAudioMixer.png

You can also create sub-mixers, so you can divide the sounds of the game and apply different filters to it, in addition to the main mixer.

Attenuation.PNG

In the output field of the audio source of the different objects you can select the audio mixer that you want that sound belong to.

DrivingTankAudio.png

And as you can see in the images you can add filters, modify the pitch, level, attenuation and other things until you are satisfied with the sound effects of the game.

The next idea is to create an interface to interact with the tank and game manager scripts. This interface will let the player to set some properties for the game (like adjusting the damage, the force and the color of the tank).

Project Update #3

We are almost on the end of the tutorials, I guess we will finish it and start creating the modified game by Wednesday. Because there are a lot of things we’ve done and there is no much time to explain everything, I’ll just add some images and briefly explain what they are.

This part is about creating the tank health, UI and logic. So I started adding a slider. Because the canvas is it’s own space it’s needed to change the Render mode to World Space.

Canvas

I moved the slider under the tank, changed its size and deleted the thing to move its value.

canvas2

I changed the default image by this one, it is a circle with a gap in the middle. Also changed the slider mode to radial (so it fills clockwise and not left to right).Canvas3

I added the script to control the health slider, I used color interpolation to calculate the color needed in the cicle and set the value of the slider based in the health of the tank.

chap3

And now you can see that the tank has a green circle around it. There’s also a explosion animation for the tank, when the healh of the tank reaches zero, an explosion animation is created in the same position as the tank and the tank object is deleted from the scene.

explosinThis part is about creating the shells prefabs.

First I added the shell model to the scene, added a Capsule collider to it, checked Is Trigger (to trigger a method when it collides with a tank), and also a light.

Shell

Here’s some code that goes in the Shell. When it collides it searches for tanks (that are in a special layer that groups all the tanks), calculates its distance to the tanks and apply a force and a damage to the tank according to that distance. When the shell touches something, it plays an explosion animation and deletes the shell object. Also, the shell is automatically deleted after it’s been two seconds in the scene (to avoid having around shells that, for some reason, never collided).

explosionScript

Here you can see, I dropped a shell in the scene, it exploded and the tank taked damage.shellExplosionNext part is about shooting shells, I added another slider, changed the image to the yellow arrow and set its position in front of the tank.

FireShellUI

Here’s the code that allows the tank to shoot. The tank can charge its shoot and when the player releases the shoot key, a new instance of the shell prefab is created, and its velocity and direction is calculated according to the tank position, rotation and the amount of time that the player pressed the key. It also sets the value of the slider to the value of the charge amount, so the player can see the arrow growing when they press the fire button.ShellShootCode

And here you can see the tank rotating and firing shells!shootingShells

Next in the list is creating a manager to handle the spawning of tanks.

CRC cards

CRC Cards

 

What are CRC cards? Are they really useful or just a waste of time? Why should I care? Where where were you on the night of December 25th? We all have asked these questions to ourselves at least once in our lives. And I’ll just answer the first one.

CRC (stands for Class, Responsibility and Collaboration) cards (stands for Community Assistance for Reconstruction, Development, and Stabilisation) is an Object Oriented design pattern, useful.

These cards are supposed to help the software developer to think which objects he will need to have, what methods they will have and how will they interact among them, even before start writing code. It is supposed to be a good tool to learn the OOP paradigm because, regardless the syntax or implementation of an specific language, you can focus in what really matters, the whole concept of objects.

To write CRC cards you need to think about three things:

  1. Class (name):The class has to have a short and descriptive name of what it represents and what it does.
  2. Responsibility:
    The problems that the class is supposed to solve and its procedures, these should be short verb phrases containing an active verb. This is typically what this class does when it interacts with other classes.
  3. Collaboration:
    Objects should not be isolated from each other, they all must collaborate to accomplish a common goal, just like we learned from The Wonder Pets! Here you write with which other classes this one interacts with.

CRC cards have the following format and are written in 4×6 index cards:

With CRC cards you can clearly see the relationship between classes, and the index cards have the advantage that you can move them around, organize and overlap them so you can put them in certain position that helps you to think about the relationship between these classes.

And with this I answer to the fist question, you should be able to answer the second and third questions by yourself, maybe the fourth too.

Information and images extracted from http://c2.com/doc/oopsla89/paper.html

Permission to copy without fee all or pan of this material is granted provided that the copies are not made or distributed for direct commercial advantage, the ACM copyright notice and the title of the publication and its date appear and notice is given that copying is by permission of the Association for Computing Machinery. To copy otherwise, or to publish, requires a fee and/or specific permission.

Overloading vs. Overriding

Overload

Serendigity. “Overload” Online Image. Flickr. Octover 3, 2007. https://www.flickr.com/photos/maleny_steve/1473552769/

Overloading and overriding are two similar concepts -they both are about creating several methods with the same name- but very different when it comes to practical functionality and implementation.

Overloading (formally, static polymorphism) is resolved at compile time, and it is when the methods with the same name are declared in the same class, distinguished only by their signatures (the parameters of the method), so that the compiler knows which method overload you are calling based on the data type of the arguments you are passing.

Overriding (or overwriting, according to ken), is resolved at runtime and it is when you define a method that is already defined in a parent class. It can be resolved because of the data type of the “implicit first parameter” (aka, the object itself).

Java implementation

Overloading

overloading1

Overloading with different data types and number of parameters.

overloading2

Overloading with same data types and number of parameters, but different order.

overloading4

Overloading allow different return types.

overloadingerror1

The return type of the method is not considered when overloading.

Overriding

overriding4.png

In this example of overriding I have the Person abstract class, this class cannot be instantiated, but it provides like a “template” for its children classes. For example, the Person class has a String field “name”, because every person has a name, and a public method “talk” because all persons can talk (ok, almost all), this method prints “I’m a ” to the console, because, like I said, this is like a template, and different persons have different (very interesting) things to say. The method “getName” returns the name of the person. The constructor just takes the String name, although you can’t call this constructor directly, it can be called from its children classes.

It’s children classes are not abstract and extend (are children of) the Person class. They implicitly have “name”, a method “talk” and a method “getName”. Read the code of the Student and the Teacher classes and note how the constructors have a line “super(name)”, this is a call to the parent class constructor, and it will throw an error if it’s not there. Both the Student and the Teacher class Override the talk method, the notation @Override over the talk method just tells the compiler that you are overriding a method (no shit, Sherlock), it’s not required but you should use it to enforce proper overriding of a method. The talk() methods of Student and Teacher call the “super.talk” method (unlike the constructor, you can miss this statement here and there will be no errors), it prints “I’m a “, and then it prints something else. I also included an Overload of an Overriding method (mind blown) in the Student class to show the difference, it just prints “I love” + the argument (there is no call to super.talk()).

In the main method of the Person class I declare 2 persons, one teacher and other student, also, I declare a Student as a Student, this sound stupid but actually affects in the code. The preferred way is to declare the variable with the data type of the abstract class and instantiate it as the type that you actually want to use (Declared type on the left  and Actual type on the right so your code is not dependent from a specific implementation of an interface/abstract class. You can read more about this here. You can see that when the talk method is called from both the teacher and the student they print different things. Finally, to call the Overload method “talk(String food)” of “s” (with Declared type Person and Actual type Student) you have to implicitly cast it to Student and then call the method, like ((Student)s).talk(“tacos”), this is because this implementation is not declared in the Declared type of “s”. However, with “c” this does not happen, you can call that overload method because the Declared type of “c” is Student. Anyway, this is not considered a good OO practice, you should avoid writing methods that are not in the parent class, because there is a method specific to the Children class, and therefore making the code dependent from that class, and what you want is to make the code independent from specific implementations of the children classes (like explained in the previous stack overflow link).

11w1f1

Project Update #2 (and change)

We are changing our project for something simpler due to time and lack of Unity knowledge, it’s still a game though.

So the new project is about a tank fight videogame, we’ll do this game following the Unity tutorial Tanks tutorial, and this way we will learn how to use Unity and create the project.

But of course we won’t just deliver a videogame someone else made, the idea is to complete the tutorial and then use the same assets and modify the game so that it looks and plays different.

This is what we have so far.

chap3

Untitled

We have the scenario, the camera logic (calculating were it shoud be looking at, according to the tanks position) and the tank movement (input and particle effects).

More information will be availible soon, please contact your #TC201 provider.