Table of Contents

Part 3

Entries

November 4, 2011

November 18, 2011

November 21, 2011

Despite the fact that the class is watching troll 2 on the video wall I am going to attempt to actually do some work. One more keyword for sys prog then I must tackle data structs.

December 1, 2011

   The third part of opus is done and now it is time for eoce.  As usual I think I overreacted to the amount of work as the teacher seems to be very understanding and doesnt seem to expect everyone to get everything done.  I think he is just looking more for progress and a willingness to learn.  I can safely say that I have definitely made progress and learned a lot this semester.  Sometimes I got frustrated but just about every time I asked about a topic the teacher was able to lead me to learning something new.  I can also safely say I cannot wait for a break!

cprog Topics

Keyword 1: C library, libraries, makefile

Keyword 2: Mult-file programs

Keyword 3: I/O stream

Keyword 4: Array of char vs. C++ string data type

Keyword 5: Namespaces

here is a good resource for further understanding

Keyword 6: Templates

Keyword 7: Standard template library

Keyword 8: type casting operators

Keyword 9: constant/volatile

Keyword 10: classes and objects

Keyword 11: Access control

There are three levels of access control within a class:

Keyword 12

Identification and definition of the chosen keyword. Substitute “keyword” with the actual keyword.

If you want to demonstrate something on the command-line, you can do so as follows:

lab46:~$ cd src
lab46:~/src$ gcc -o hello hello.c
lab46:~/src$ ./hello
Hello, World!
lab46:~/src$ 

data Topics

Keyword 1: LIFO and FIFO

Done in part 2

Keyword 2: Computational complexity

resource

Keyword 3:Big-O, theta, bounds

In computer science, Big-O and Big theta is used to describe how an algorithm responds to different input sizes. This can be used to describe an algorithm's efficiency by determining processing time and working space requirements. Depending on the bounds you wish to describe will determine which notation would be used as big-o is more for just having an upper bound where big theta is upper and lower.

Keyword 4: Sorting algorithms

Keyword 5: Selection sort

resource

Keyword 6:Bubble sort

resource

Keyword 7: Insertion sort

resource

Keyword 8: Quick sort

resource

Keyword 9: Merge sort

more

Keyword 11: Trees, Binary Trees(nodes, parents, children)

Keyword 12: Searching a binary tree

resource

hpc1 Topics

Keyword 1

Identification and definition of the chosen keyword.

If you wish to aid your definition with a code sample, you can do so by using a wiki code block, an example follows:

/*
 * Sample code block
 */
#include <stdio.h>
 
int main()
{
    return(0);
}

Keyword 2

Identification and definition of the chosen keyword.

If you want to demonstrate something on the command-line, you can do so as follows:

lab46:~$ cd src
lab46:~/src$ gcc -o hello hello.c
lab46:~/src$ ./hello
Hello, World!
lab46:~/src$ 

Keyword 3

Identification and definition of the chosen keyword. Substitute “keyword” with the actual keyword.

If you wish to aid your definition with a code sample, you can do so by using a wiki code block, an example follows:

/*
 * Sample code block
 */
#include <stdio.h>
 
int main()
{
    return(0);
}

Keyword 4

Identification and definition of the chosen keyword. Substitute “keyword” with the actual keyword.

If you want to demonstrate something on the command-line, you can do so as follows:

lab46:~$ cd src
lab46:~/src$ gcc -o hello hello.c
lab46:~/src$ ./hello
Hello, World!
lab46:~/src$ 

Keyword 5

Identification and definition of the chosen keyword. Substitute “keyword” with the actual keyword.

If you wish to aid your definition with a code sample, you can do so by using a wiki code block, an example follows:

/*
 * Sample code block
 */
#include <stdio.h>
 
int main()
{
    return(0);
}

Keyword 6

Identification and definition of the chosen keyword. Substitute “keyword” with the actual keyword.

If you want to demonstrate something on the command-line, you can do so as follows:

lab46:~$ cd src
lab46:~/src$ gcc -o hello hello.c
lab46:~/src$ ./hello
Hello, World!
lab46:~/src$ 

Keyword 7

Identification and definition of the chosen keyword. Substitute “keyword” with the actual keyword.

If you wish to aid your definition with a code sample, you can do so by using a wiki code block, an example follows:

/*
 * Sample code block
 */
#include <stdio.h>
 
int main()
{
    return(0);
}

Keyword 8

Identification and definition of the chosen keyword. Substitute “keyword” with the actual keyword.

If you want to demonstrate something on the command-line, you can do so as follows:

lab46:~$ cd src
lab46:~/src$ gcc -o hello hello.c
lab46:~/src$ ./hello
Hello, World!
lab46:~/src$ 

Keyword 9

Identification and definition of the chosen keyword. Substitute “keyword” with the actual keyword.

If you wish to aid your definition with a code sample, you can do so by using a wiki code block, an example follows:

/*
 * Sample code block
 */
#include <stdio.h>
 
int main()
{
    return(0);
}

Keyword 10

Identification and definition of the chosen keyword. Substitute “keyword” with the actual keyword.

If you want to demonstrate something on the command-line, you can do so as follows:

lab46:~$ cd src
lab46:~/src$ gcc -o hello hello.c
lab46:~/src$ ./hello
Hello, World!
lab46:~/src$ 

Keyword 11

Identification and definition of the chosen keyword. Substitute “keyword” with the actual keyword.

If you wish to aid your definition with a code sample, you can do so by using a wiki code block, an example follows:

/*
 * Sample code block
 */
#include <stdio.h>
 
int main()
{
    return(0);
}

Keyword 12

Identification and definition of the chosen keyword. Substitute “keyword” with the actual keyword.

If you want to demonstrate something on the command-line, you can do so as follows:

lab46:~$ cd src
lab46:~/src$ gcc -o hello hello.c
lab46:~/src$ ./hello
Hello, World!
lab46:~/src$ 

sysprog Topics

Keyword 1: i/o redirection

.

Keyword 2: Pipes

Keyword 3 Server/socket

Keyword: Client server model

Keyword 5: Coroutines

Keyword 6: connections and protocols

Keyword 7: Server socket

Client/Server model

resource

Keyword 8: client sockets

Client sockets

resource

Keyword 9: Zombie

Keyword 10: Datagrams

Keyword 11: Tcp vs. udp

resource

Keyword 12: Distributed systems

resource

cprog Objective

Objective

State the course objective; define what that objective entails.

Method

State the method you will use for measuring successful academic/intellectual achievement of this objective.

Measurement

Follow your method and obtain a measurement. Document the results here.

Analysis

Reflect upon your results of the measurement to ascertain your achievement of the particular course objective.

data Objective

Objective

State the course objective; define what that objective entails.

Method

State the method you will use for measuring successful academic/intellectual achievement of this objective.

Measurement

Follow your method and obtain a measurement. Document the results here.

Analysis

Reflect upon your results of the measurement to ascertain your achievement of the particular course objective.

hpc1 Objective

Objective

State the course objective; define what that objective entails.

Method

State the method you will use for measuring successful academic/intellectual achievement of this objective.

Measurement

Follow your method and obtain a measurement. Document the results here.

Analysis

Reflect upon your results of the measurement to ascertain your achievement of the particular course objective.

sysprog Objective

Objective

State the course objective; define what that objective entails.

Method

State the method you will use for measuring successful academic/intellectual achievement of this objective.

Measurement

Follow your method and obtain a measurement. Document the results here.

Analysis

Reflect upon your results of the measurement to ascertain your achievement of the particular course objective.

Experiments

Experiment 1: NoTouchy!

Question

Can a child touch its parents private parts?

#include <iostream>
 
using namespace std;
 
class parent
{
	private:
		int number;
};
 
 
class child : private parent
{
 
	public:
		char character;
		void print();
};
 
int main()
{
	child notouchy;
	notouchy.number = 10;
	notouchy.print();
 
	return 0;
}
 
 
void child::print()
{
	cout<<number;
}
lairstation3:~/Desktop$ g++ privateparts.cc -Wall
privateparts.cc: In function ‘int main()’:
privateparts.cc:8: error: ‘int parent::number’ is private
privateparts.cc:23: error: within this context
privateparts.cc: In member function ‘void child::print()’:
privateparts.cc:8: error: ‘int parent::number’ is private
privateparts.cc:32: error: within this context
#include <iostream>
 
using namespace std;
 
class parent
{
	public:
		int number;
};
 
 
class child : public parent
{
 
	public:
		char character;
		void print();
};
 
int main()
{
	child notouchy;
	notouchy.number = 10;
	notouchy.print();
 
	return 0;
}
 
 
void child::print()
{
	cout<<number;
}
lairstation3:~/Desktop$ g++ privateparts.cc -Wall
lairstation3:~/Desktop$ ./a.out
10

Experiment 2: Private/Public default?

Question

When declaring variables within a class do they default to private or public?

#include <iostream>
 
using namespace std;
 
class parent
{
 
		int number;
};
 
 
class child : parent
{
 
 
		char character;
		void print();
};
 
int main()
{
	child notouchy;
	notouchy.number = 10;
	notouchy.print();
 
	return 0;
}
 
 
void child::print()
{
	cout<<number;
}
lairstation3:~/Desktop$ g++ privateparts.cc -Wall
privateparts.cc: In function ‘int main()’:
privateparts.cc:8: error: ‘int parent::number’ is private
privateparts.cc:23: error: within this context
privateparts.cc:17: error: ‘void child::print()’ is private
privateparts.cc:24: error: within this context
privateparts.cc: In member function ‘void child::print()’:
privateparts.cc:8: error: ‘int parent::number’ is private
privateparts.cc:32: error: within this context
lairstation3:~/Desktop$ 

Experiment 3: Does inheritance from parent to child default to public parts?

#include <iostream>
 
using namespace std;
 
class parent
{
	Public:
		int number;
};
 
 
class child : parent
{
 
	Public:
		char character;
		void print();
};
 
int main()
{
	child notouchy;
	notouchy.number = 10;
	notouchy.print();
 
	return 0;
}
 
 
void child::print()
{
	cout<<number;
}
lairstation3:~/Desktop$ g++ privateparts.cc -Wall
privateparts.cc: In function ‘int main()’:
privateparts.cc:8: error: ‘int parent::number’ is inaccessible
privateparts.cc:23: error: within this context
lairstation3:~/Desktop$ 
#include <iostream>

using namespace std;

class parent
{
	public:
		int number;
};


class child : private parent
{

	public:
		char character;
		void print();
};

int main()
{
	child notouchy;
	notouchy.number = 10;
	notouchy.print();

	return 0;
}


void child::print()
{
	cout<<number;
}
privateparts.cc: In function ‘int main()’:
privateparts.cc:8: error: ‘int parent::number’ is inaccessible
privateparts.cc:23: error: within this context
lairstation3:~/Desktop$