Thursday, November 26, 2009

abstract base class- pure virtual

IO_Field is an abstract base class and has some pure virtual functions, indicated by the
= 0; at the end.

virtual void display(void)const = 0;
virtual int edit(void) = 0;
virtual bool editable(void)const = 0;
virtual void set(const void *) = 0;
virtual void set(IO_Form* owner) = 0;

When functions are pure virtual, they should not have any other code (in the .cpp file). Also, when a class is an abstract base class with pure virtual functions, whatever classes that INHERIT the abstract base class (with pure virtual functions) MUST have code (usually in the .cpp) for those (pure virtual) functions (in the abstract base class).

Wednesday, November 25, 2009

(tag) && (!trunk || !branch);

Team Funktion had an in-person meeting last night in the Seneca@York library.

Our tag folder on SVN has been updated so that it is compiling. A vs project has been added to the tag folder. Eric is currently working on getting IO_Label to display inside the form.

The branches folder is messy (my fault) and apparently, the trunk is not compiling (not my fault). If it's ok with everybody, when we get our new SVN (coming soon) we should work with the compiled code that is in our tag folder.

Perhaps somebody can go and delete content in our branches folder. I don't know how.

blog+=blog;

Fardad said that as part of the final evaluation, we will each have to grade each other anonymously.

It is important to remember that if you are not sending emails or blogging or updating your user.txt file on SVN, than the other team members have no way of grading your participation except to figure out what you coded. That's really tough for me because I can barely figure out what I coded.

So remember the following...

1) BLOG! Even if you have little to report. A few words on a regular basis will remind the team that you are still with them.

2) Update your user.txt file on SVN. Even if you are not committing code. This is another place that Fardad will look when he is grading you.

If your team members can read your blog, they will be more inclined to grade you favorably.

Assigned Class

Remember that having an assigned class does not mean you have to write it by yourself. For example, I was assigned IO_Form, but Neda put a lot of work into it. Last night Eric and I were working together to debug the IO_Label display().

Having an assigned class means that you are responsible for making sure it works when we are submitting, but everybody should be involved with all parts of the project. Even if all you do is walk-through it.

If you are waiting on another class in order to proceed, than perhaps you should offer to help out. You can even start by giving the class some basic functionality so you can move forward.

You can also be involved by optimizing other parts of the code. Just be sure to discuss it with the person in charge before you commit any revision.

Wednesday, November 18, 2009

OOP344 Assignment 2 - My Current Status

I started working on Assignment 2 last weekend. My responsibility is io_form and I am going to to use the Linked List method. After spending some time trying to get started, I gave up and just reviewed Linked Lists instead.

On Tuesday November 17th, Neda and I met with Fardad to discuss some basics about Assignment 2. I recorded the meeting. You can download it here.

Tonight I will be meeting with a tutor in the learning center to help me get started with some actual code.

Saturday I am coming to the Seneca library to build a main that can test the io_form and io_field.

Thursday, November 12, 2009

OOP344 Assignment 2 - makefile

I am using a makefile to work with my assignment 2 on the mac, rather than compile in xcode. Since the program is text-based, I'm finding it easier to view in the terminal.

Earlier I had posted an issue I was having with my makefile. The issue is resolved now. You can view my makefile below.

# makefile for OOP344 Assignment 2

# By: Ljubomir Gorscak
# November 12, 2009
#

# build main
binaries: main

# links the binary components for main
main: main.o ciol.o io_frame.o lj_field.o
g++ main.o io_frame.o lj_field.o ciol.o -lcurses -o main

# recompiles main.cpp if anything changed
main.o: main.cpp ciol.h io_def.h io_frame.h lj_field.h
g++ -c main.cpp

# recompiles ciol.c if anything changed
ciol.o: ciol.c
gcc -c ciol.c -lcurses

# recompiles io_frame.cpp if anything changed
io_frame.o: io_frame.cpp
g++ -c io_frame.cpp

# recompiles lj_field.cpp if anything changed
lj_field.o: lj_field.cpp
g++ -c lj_field.cpp


# clean for Assignment 3
# clean.mak

# removes any file ending with .o and main from the current directory
clean:
rm -f *.o main

Wednesday, November 11, 2009

OOP344 Assignment 2 - Thoughts on team work

In my humble opinion, it would be very difficult to understand this project as a whole if each team member only writes the class assigned to them. There are a few ways that we can learn from each other.

1) Ask for help from team members
2) Offer to help other team members
3) Walk through other team members classes and offer to optimize their code (make sure you ask first!)

Sunday, November 1, 2009

Question from previous OOP344 test

I don't understand this question...

"Write a program that prints the number of environment variables of the operating system."