-
Notifications
You must be signed in to change notification settings - Fork 0
Warming Up
Deadline: Wednesday, 26. September 2011, 12:00
To register for the exercises, you must
- Create a github account (if you already have one, you can reuse it) ;
- Create a repository ese2012_warmup;
- Follow ese_unibe_ch on twitter ;
Then
- Send a mail to
[email protected]
with the title "registration ESE 2012", containing your github and twitter accounts.
We will confirm your registration, and send you the license key for RubyMine.
Recommended readings for github are:
This part of the exercise is solved if you successfully obtained a reply to your registration email.
We request that you write a short bio about yourself using the github wiki:
- Add a wiki page "bio" to the wiki of ese2012_warmup.
- Introduce yourself by writing a few short paragraphs about yourself and your knowledge and experience in Software Engineering. If you like you can also write down your contact information, this will likely be useful during the project later on in this course.
Answer the following questions with a few keywords or a short sentence:
- What programming languages do you know and use?
- Have you been involved in any software projects?
- Do you have experience working in teams?
The goal of this task is to implement a simple application to trade items. Users have an amount of credits. Users in the system can propose items to a fixed price, which other users can buy using their credits.
The requirements you are asked to implement are:
- Users have a name.
- Users have an amount of credits.
- A new user has originally 100 credit.
- Items have a name.
- Items have a price.
- An item can be active or inactive.
- An item has an owner. Only the owner can modify attributes of an item.
- A user can add a new item to the system; the item is originally inactive.
- A user can buy active items of another user (nactive items can't be bought). When a user buy an item, it becomes the owner; credit are transferred accordingly; the transaction fails if the buyer has not enough credits; immediately after the trade, the item is inactive.
Note that this task only involves to model the requested features of the entities User
and Item
. We do not ask you to provide a user-interface. The code has to be accompanied with unit-tests though. For each of the above requirements, it is required to have at least one test method containing at least one assertion. For the last requirement, you must have at leat 3 test methods that cover different cases (enough/not enough credit, active/inactive, etc.) The code must be structure according to the following rules:
/lib
appname.rb
/module-x
class-in-module-x.rb
/test
test-y.rb
Coding style is camelCase
.
You can solve the third part of the exericse in team of two. You are asked to deliver the code in the ese2011-warmup repository of one of the author. You need to send a mail to [email protected]
with the following subject line: ''Exercise 1: Warming Up'', give the names of the authors, and the git repository to pull the code from. We must be able to create an ruby project out of your code and run the tests with no pain. Exerices must be delivered by ""Wednesday, 26. September 2011, 12:00"".