Welcome! Log In Create A New Profile

Advanced

Assignment 3 related issue(s)

Posted by iva 
Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
Re: Assignment 3 related issue(s)
June 26, 2007 04:10PM
Go to the same site, click download and then select windows libraries.

id3lib
iva
Re: Assignment 3 related issue(s)
June 26, 2007 04:59PM
ah on the sourceforge site .. ok ...thanks trying it now
iva
Re: Assignment 3 related issue(s)
June 26, 2007 05:23PM
hm.. tried it , added the files t my cpplib, and the source to the includepath. but looks like the same errors again, invalid function declaration in id3libframe.h and others, just on the line after their class declarations..where just a { is


the only upside of this is that i've taken out hte files from my projects and therefore they're being read properly frm the libs now ...
Anonymous User
Re: Assignment 3 related issue(s)
June 26, 2007 10:35PM
I'm sort of following this thread. I've put together a gui with Qt Designer and assumed it would compile normally (silly me..). I have had a simple app compile and run so I'm ruling out an incorrect Qt install. My other apps don't build and return silly error messages. I tried Jean's suggestions and can now vary my error messages at will smiling smiley .
I'm also thinking that Qt4 ezust libs are incompatible with mingw. See my error below and tell me if you agree:
c:\unisa\mingw\...\bin\Id.exe: cannot find -lQtUiToolsd
collect2: Id returned 1 exit status
mingw32-make(1):***[debug\sort_dialog.exe] Error 1
mingw32-make: ***[debug]Error 2

edit:
I'm confused. When we installed the ezust libs, did we overwrite a Qt capability to read and compile .ui files? Or are the ezust libs just an add-on that we must call when compiling ezust examples?

Why I ask these questions comes from an excerpt from the online textbook:

The GPL version of Qt supplied on the CD will not work with Visual C++, so if you do not have MinGW already installed you will need to install it.

So we must have mingw. I'm confused.
iva
Re: Assignment 3 related issue(s)
June 27, 2007 07:27AM
i can't comment on the error message, sorry no idea, maybe something to do with your CPPLIBS, i think mine are working now since i took jeans project file parameters futher up this thread, but i can say i'm using mingw32 and i got it working eventually for most of my projects.. personally i think an attempt at this project is pointless. the lecturers should be ahead of us with this and posting "how tos" to get this thing working and they aren't, which makes me think they are probably stuck in the same boat and don't know how..

also i don't think what we got on the cd is very current as remember we have to download half the stuff from the ezust download page
Re: Assignment 3 related issue(s)
June 27, 2007 10:09AM
@Rick

There is a version of Qt that works with Visual C++ but you have to buy it. I think it integrates the visual designer etc. into Visual C++. You might be able to compile Qt with the Visual C++ compiler and even use it with the VC ide, but I think that is not allowed with the open source licence.

And yes, the libraries provided by ezust is just an add-on. I think it is intended to show us how to combine external api's into our projects.
Re: Assignment 3 related issue(s)
June 30, 2007 11:04AM
Is it possible that someone can please email me the filetagger tarbal and the id3lib and all the other files we have to download for this?
I'm having some serious problems with my internet sad smiley
thanks
kilhra@gmail.com
iva
Re: Assignment 3 related issue(s)
June 30, 2007 03:29PM
HI Kilhra i've sent you the filetagger, i'm not sure now if we need everything else, the lecturer i spoke to said we must just implement the abstract class MP3Song as per the UML diagram on page 554, ie create an MP3File .h and .cpp that derives from MP3Song and implements all the functions

that is at least just for the first part i haven't looked at the 2nd part yet....

good luck
Re: Assignment 3 related issue(s)
June 30, 2007 09:50PM
Thanks...I got it more or less working. smiling smiley
Re: Assignment 3 related issue(s)
July 01, 2007 12:59PM
Hi Kilhra, Iva, Jean, Anyone smiling smiley

I still don't quite understand what we need to do. Ok, we must define a class that implements the Mp3Song interface. According to me that is exactly what the filetagger class does? So I assume the Mp3File class we need to implement is a different implementation of the Mp3Song class than the filetagger, but what must it do then? Where do we get the values from that we need to set?

How does the filetagger class then fits in with our whole application? And do we need to develop the interface for the mp3 player too or is it just the classes they want to see? Without implementing the interface how can we test this class, do we just hard code some values in our main application that we set and get?

I just don't want to go off on a mission developing something that was not required so please help! Hope the questions make sense!

Thanks!
Re: Assignment 3 related issue(s)
July 01, 2007 01:07PM
One more:

Does this class just need to enable us to save and retrieve all the values to and from a file?

Thanks, I don't know how I would have gotten through the first two assignments without all your help...
iva
Re: Assignment 3 related issue(s)
July 01, 2007 01:20PM
i just realised the file tagger does implement the song, but my advice is don't botehr withit unless you have it compiled alread, i got nowhere trying to do it.
so don't even look at it when you implemetn the song you just get so many compiler errors , start from scratch and implemnt the song functions, i think all you need to get working is that you can instantiate it afterwards from a main function.
once you got that working do the next bullet point of te assignment ie create a playlistmodel which makes a qlist out of the songs ..
thats it! <for part 1 anyways>
Re: Assignment 3 related issue(s)
July 01, 2007 01:25PM
This makes it alot easier, I've been struggling with the filetagger for a while now. Yipeeee, I feel relieved! For the moment at least smile

Thanks iva!
Re: Assignment 3 related issue(s)
July 06, 2007 05:51PM
Iva,

You asked Ezust about a project depending on id3lib which again depends on zlib.
What was his answer on how to go about it?.

Omilo
iva
Re: Assignment 3 related issue(s)
July 06, 2007 08:10PM
he just refered me to the 2 downloads the file tager and the id3lib one.. i eventaully gave up on trying to get the whole thing to work
Getting id3lib to run under Ming
July 07, 2007 10:28PM
I haven't seen any instructions for getting id3lib to work under Ming (on the forum, or really even on the rest of the internet). After much stuffing about I've FINALLY got the libraries compiled along with a demo project running in QIDE.

I've stuck the (precompiled) library and a Qt console demo app in an archive which you can get at http://www.brynthomas.net/unisa/COS311A3.zip

1. Copy the libid3.a file from the lib folder in the archive into your c:\unisa\mingw\lib folder

2. Load up the qtid3info project and compile that.

3. Test it by running qtid3info "My Mp3 File.mp3" from the debug directory.

---

If you want to compile it yourself you can try something like:

1. Replace some files in id3lib with the modified ones in the above archive. These do the time-honoured trick of "If it moans about missing things, remove the lines that print the error and exit.". Apparently zlib isn't all that important.

2. Download MSYS (http://gd.tuwien.ac.at/gnu/mingw/MSYS-1.0.11-2004.04.30-1.exe)

3. Install it and tell it to look in c:/unisa/mingw

4. Get your QT Command Prompt, then "cd c:\msys\1.0" and run "msys.bat"

5. Inside that new window "cd /c"

6. From there navigate to where your id3lib folder is with the modified files (using "cd" and "ls"winking smiley

7. Run "./configure" in the id3lib folder

8. Run "make"

9. Run "make install"

10. Now you can go open Explorer and find your libid3.a file in "C:\msys\1.0\local\lib" and the headers in "C:\msys\1.0\local\include"
Re: Assignment 3 related issue(s)
July 09, 2007 10:04AM
Brynt

Thanks for this. I added the to my project but still got unresolved externals.
Here are some of it.

C:/unisa/4108558/cos3114/assignments/assignment3/p555/p555/filetagger.cpp:18: undefined reference to `ID3_Tag::HasV1Tag() const'
debug\filetagger.o(.text+0x1a6): In function `ZN10FileTagger11setFilenameERK7QString':
C:/unisa/4108558/cos3114/assignments/assignment3/p555/p555/filetagger.cpp:24: undefined reference to `ID3_Tag::ID3_Tag(char const*)'

debug\filetagger.o(.text+0x27f):C:/unisa/4108558/cos3114/assignments/assignment3/p555/p555/filetagger.cpp:28: undefined reference to
`ID3_Tag::Link(char const*, unsigned short)'
debug\filetagger.o(.text+0xca9): In function `ZN10FileTagger13setPreferenceERK7QString':
C:/unisa/4108558/cos3114/assignments/assignment3/p555/p555/filetagger.cpp:46: undefined reference to `ID3_AddComment(ID3_Tag*, char
const*, char const*, char const*, bool)'
debug\filetagger.o(.text+0xd32): In function `ZNK10FileTagger13getPreferenceEv':
C:/unisa/4108558/cos3114/assignments/assignment3/p555/p555/filetagger.cpp:51: undefined reference to `ID3_GetComment(ID3_Tag const*,
char const*)'
debug\filetagger.o(.text+0xdd5): In function `ZN10FileTagger8setGenreERK7QString':
C:/unisa/4108558/cos3114/assignments/assignment3/p555/p555/filetagger.cpp:55: undefined reference to `ID3_AddGenre(ID3_Tag*, char co
nst*, bool)'
debug\filetagger.o(.text+0xe56): In function `ZNK10FileTagger8getGenreEv':
C:/unisa/4108558/cos3114/assignments/assignment3/p555/p555/filetagger.cpp:59: undefined reference to `ID3_GetGenre(ID3_Tag const*)'
debug\filetagger.o(.text+0xfaa): In function `ZN10FileTagger6commitEv':


Any suggestions?
Re: Assignment 3 related issue(s)
July 09, 2007 10:13AM
Hi

Sorry, I can't help, but I just want to check that I'm not missing something...why are you guys still trying to get the the filetagger/id3lib to work? Do we need it for the assignment?

As far as I know we only need to do the first two assignments of chapter 25 and none of them require us to actually implement filetagger (except maybe Q3 of the first assignment, but it only talks about getters and setters for the mp3file class and iva mailed the lecturers and they said we didn't need it for the first assignment...) ?

The second assignment is the 'preference' one and doesn't require the filetagger or id3lib.

Anyone who can clear this up?
Re: Assignment 3 related issue(s)
July 09, 2007 11:29AM
Just mailed the lecturers, got a super duper fast reply:

You do not need to compile the filetagger files as it is only required in the assignment on p 559. Thank you for you query.
Re: Assignment 3 related issue(s)
July 09, 2007 12:11PM
Adri

Thanks. I also contacted her, but I explained the confusion in that the UML diagram (p554), that is normally the basis of a project does include the filetagger. And as soon as you include the file tagger, then everything else is needed. The 3rd bullet of the assignment also refers to the UML diagram.
Yes, it seems we only have to implement the right hand side of the UML on p554.

An issue with the UML diagram (p554), that still needs to be resolved is that the PlaylistModel is on top of this diagram and after referencing another book ("Applying UML and Patterns by Craig Larman" P255) it should/could have been at the bottom of the three. If you look at the UML on P556, then the UML on P554 does not make sense. I might be wrong but the lecturer will let me know.

And then, it would have been nice if we could have implemented everything because, that is what Patterns is all about, to reuse a WORKING sollution.eye rolling smiley
iva
Re: Assignment 3 related issue(s)
July 09, 2007 01:26PM
i hope we are marked forgivingly for this assignment, we didn't get to learn about UML diagrams but half the assignment is doing UML, and the book was not that realiable in teaching UML modeling
Re: Assignment 3 related issue(s)
July 13, 2007 12:37PM
This is a useful link just to recall the UML we've leant from http://atlas.kennesaw.edu/~dbraun/csis4650/A&D/UML_tutorial/class.htm
Anonymous User
Re: Assignment 3 related issue(s)
July 17, 2007 11:58PM
Jean, can I please email you my code that's not compiling? Looks like the lecturer forgot about my problem which I emailed to her a while back. She must be very busy.
Thanks,
Rick
Re: Assignment 3 related issue(s)
July 24, 2007 10:20PM
Somewhatof a different note... The SOL and the one tut says the due date is the 30th. But tut103 no assignment03 says 31 July? Which one is it then? That extra day may sure come in handy.
Re: Assignment 3 related issue(s)
July 25, 2007 07:35AM
Peter

Use the SOL sites date because it will most probably block you on the 31st
Re: Assignment 3 related issue(s)
July 25, 2007 09:58PM
I maybe wrong about my interpretation of this question but heres what I think:

1. You don't need filetagger!
2. You don't even need id3lib!!
3. All that is required (for the purpose of this assignment):
*PlayListModel.h; PlayListModel.cpp
*Mp3Song.h
*Mp3File.h; Mp3File.cpp
4. The UML diagram is wrong: there should be a composition relationship between PlayListModel and Mp3Song and not an inheritance relationship (i.e.: 1 instance of PlayListModel can have many instances of Mp3Song or simply: 1 playlist can have many Mp3 files)
5. Filetagger inherits from Mp3Song only, and is not "needed" by PlayListModel/Mp3Song/Mp3File - none of these classes depend upon it.

In a nutshell, we only have to concentrate on Mp3File, Mp3Song and PlayListModel for the purpose of this assignment. Just my 2 cents winking smiley

Ok now I have a question for you guys: Mp3File inherits from DataObject- I'm not sure I understand how DataObject fits into this whole scenario. We only need to implement getters,setters and data members, and this can be done without DataObject. How/what should be inherited from DataObject?? Thanks.

Regards
Anonymous User
Re: Assignment 3 related issue(s)
July 25, 2007 10:54PM
Mp3file.h and .cpp

You can copy the full class filefrom this web page, all done for you. just look around on the page and the one before it

http://cartan.cas.suffolk.edu/oopdocbook/api/html/mp3file_8h-source.html
Re: Assignment 3 related issue(s)
July 26, 2007 11:38AM
When i compile and run the code, mp3file refers to preference.h which is missing. Where should it be placed, and is it the one from the textbook? I don't have the book with me here at work...
Anonymous User
Re: Assignment 3 related issue(s)
July 26, 2007 12:33PM
I think you should not take it too ceriously just use it as guide lines. I deleted a lot out of it to make it work.
Re: Assignment 3 related issue(s)
July 26, 2007 01:42PM
THanks alot. i will do just that...i hope i get something working because even if i don't get 100 credits, i really do want to know what's happening for the exam...
Sorry, only registered users may post in this forum.

Click here to login