Geeks With Blogs
Mark Pearl UNISA COS 2144 Programming Contemporary Concepts
Playing with Pointers
Ever since I began programming in c++ I have gotten confused with how pointers work. I understand why they are there and why they can be useful, but in my managed world I really don’t like touching them… That being said, tomorrow I am going to be tested on pointers and so I thought I would brush up.. here is a bit of sample code on some basic uses… #include <iostream> using namespace std; int main(int argc, char *argv[]) { int x = 5; int *y = &x; int *z = y; cout << "x value : " << ......

Posted On Friday, May 20, 2011 2:03 AM

Basic Design Patterns
I have been doing a rushed brush up on my contemporary concepts programming course – only to encounter more design patterns… so as revision I have listed some details below… Today I am going to briefly cover 5 design patterns… namely: Composite Pattern Observer Pattern Serializer Pattern Monostate Pattern Command Pattern What are Design Patterns? (see wiki) In programming we come across problems that are very similar, and certain approaches to solving these problems could be applied time and time ......

Posted On Thursday, May 19, 2011 4:37 PM

More QT4 (Assignment 2 Question 2)
So the first question took sometime, partly because I was getting used to c++ again, and partly because of the way VS2008 works with QT. Anyhow, question 2 was dramatically easier. The Question… Write an application,similar to the one in Section 9.3,but that has four buttons. The first one, labelled Advice,should be connected to a slot that randomly selects a piece of text (such as a fortune cookie) and displays it in the QTextEdit window. The second one, labelled Weather,randomly selects a sentence ......

Posted On Saturday, August 28, 2010 4:19 PM

QT4, C++ and learning the basics… again (COS2144 Assignment 2, Question 1)
If anyone has been following my blogs lately, they would have noticed that they just had random rumblings of book summaries for my CS degree. This is actually the first semester where I am battling to keep up with the level of work – possibly because up to now the courses have been rather easy to complete the class work (multiple choice), and possibly because work work has gotten extremely busy which has left me with only one day a week (Saturday) to dedicate to learning and doing my assignments. ......

Posted On Saturday, August 28, 2010 1:35 PM

Programming Contemporary Concepts UNISA studies – Chap 9
Any ramblings and blog posts associated with the UNISA COS 2144 tag should be considered study notes for my lectures... This chapter examines the QObject, which is an important class to become familiar with and one from which all Qt Widgets are derived. Questions for this Section What does it mean when object A is the parent of object B? What happens to a QObject when it is reparented? Why is the copy constructor of QObject not public? What is the composite pattern? How can QObject be both composite ......

Posted On Thursday, August 26, 2010 8:32 AM

Programming Contemporary Concepts UNISA studies – Chap 6
Any ramblings and blog posts associated with the UNISA COS 2144 tag should be considered study notes for my lectures... This chapter introduces the concepts and shows some examples of how to define inheritance relationships between c++ classes, overriding methods, the vritual keyword, and simple examples show how polymorphism work. Questions for this Section What is inheritance for? Explain polymorphism. What is it? How can you use it? Explain the difference between dynamic binding and static binding? ......

Posted On Wednesday, August 25, 2010 8:48 AM

Programming Contemporary Concepts UNISA studies – Chap 5
Any ramblings and blog posts associated with the UNISA COS 2144 tag should be considered study notes for my lectures... In this chapter they discuss the essentials of function declarations, prototypes, and signatures; overloading functions; function call resolution; default/optional arguments; temporary variables and when they’re created; reference parameters and return values; and inline functions… Function Declarations Each function has… A name A return type (which may be void) A parameter list ......

Posted On Saturday, July 24, 2010 2:31 PM

More QT4 (Assignment 3 Question 1)
So, the last few days I have been finishing my summaries of my Programming Contemporary Concepts course. While it has been interesting being exposed to a new programming language, I found the actual course a bit framework specific, and not to contemporary at all. Needless to say, in the quest for the qualification I am going to put this aside and slog along. Question 1 of Assignment 3 asks us to write a template Queue<T> class and client code to test it. I will be attempting it in QT4 using ......

Posted On Saturday, September 25, 2010 7:22 PM

Programming Contemporary Concepts UNISA studies – Chap 11
Any ramblings and blog posts associated with the UNISA COS 2144 tag should be considered study notes for my lectures... Section Outline Widget Categories QMainWindow & QSettings Dialogs Images and Resources Layout of Widgets QActions, QMenus, and QMenuBars QActions, QToolbars, and QActionGroups Regions and QDockWidgets Questions for this Section List six things that QWidgets have in common How can you save and later restore the size, position, and arrangements of widgets for a GUI app? Why would ......

Posted On Friday, September 24, 2010 6:14 PM

Programming Contemporary Concepts UNISA studies – Chap 10
Any ramblings and blog posts associated with the UNISA COS 2144 tag should be considered study notes for my lectures... Section Outline Generics and Templates Containers Managed Containers, Composites, and Aggregates Implicitly Shared Classes Generics, Algorithms, and Operators Serializer Pattern Sorted Map Example Questions for this Section Explain the important difference between a template parameter and a function parameter. What does it mean to instantiate a template function? Describe one way ......

Posted On Friday, September 24, 2010 2:10 PM

Copyright © MarkPearl | Powered by: GeeksWithBlogs.net