User Tools

Site Tools


opus:fall2012:rthatch2:start

Ian's fall2012 Opus

opified by yours truly

Introduction

My name is Ian I am originally from Elmira NY I now live in Corning with my Fiance and our two year old daughter. I am interested in a wide range of things I am in the computer science program and enjoy learning to program and I am in the pursuit of large sums of money ;)

Part 1

Entries

Entry 1: August 30, 2012

This week was my first back in school in a little while and I am enjoying it. in data structures we started talking about pointers and writing small programs to test pointers and get familiar with them. in discrete structures we started on logic and started writing programs to implement the different boolean logic i picked converse non implication. Also in both classes we have been brushing up on / reviewing C which is never a bad thing the only challenges so far i feel I'm facing is the logic gate I guess also the size program in data where we had to test the size limits of the various data types but that is a good challenge and its always fun to try and solve problems and see peoples different approaches to the same problem.

Entry 2: September 15, 2012

This week we started working on linked lists and doubly linked list we wrote a linked list together than on our own we implemented differernt functions like append, insert, and remove we also started a doubly linked list and are going to be implementing the different functions for that as well. in discrete we refined our logic programs and started working on sets i choose to use a linked list to write my set program all in all good week plenty of things to keep me busy I also finished my keywords for discrete and data

Entry 3: Septembr 22, 2012

This week we got our other random keywords that we need to work on and show an example of we worked more on linked lists which i am getting better at thier still a little tuff to just do without writting it out and tweaking logic we are also working on the doubly linked list more which is always fun but other than that we havent started on anything new yet we talked today about whats coming next stacks and queues. and are just finishing up doubly linked list

Entry 4: September 30, 2012

This week I finished my opus part 1 and finished my other keywords and experiment my experiment wasn't to special but I couldn't think of any others to do. In class we started writing a sort program to sort data and finished all the modifications on our singly linked list. next week as I understand it we will begin on doubly linked list insert and remove and work on our sort program so far so good happy about completing the first part of my opus

Keywords

data Keyword 1

Function Pointers

Definition

Function Pointers are pointers that point to the memory location of a function and can be used to call and pass arguments to said function. This can be used when you might have a few functions and only one of them needs to be called but at the time of writing the program you don't know which one needs to be called.

References

Class Pointer [C++], Data Phase 2

Definition

Holds the address of another variable.

References

List any sites, books, or sources utilized when researching information on this topic. (Remove any filler text).

  • Reference 1
  • Reference 2
  • Reference 3

Demonstration

Demonstration of the indicated 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:

/*
 * Declaring and using a class pointer
 */
#include <iostream>
#include "class.h"
 
using namespace std;
 
int main()
{
   class variable;
   class *classPointer = &variable;
 
   int localVariable;
 
   classPointer->classSetFunction(localVariable);
 
   return(0);
}

discrete Keyword 1

Converse Nonimplication

Definition

Converse Non-implication is the negation of the reverse of implication. implication is if … then where it is only false if the first term “p” is true and the second term “q” is false so converse non-implication is only true if the first term “p” is false and the second term “q” is true

References

Discrete keyword 1 Phase 2

exclusive disjunction/nonequivalence

Definition

Exclusive disjunction means that only one can be true, but not both. It's basically an XOR.

References

Demonstration

Demonstration of the indicated 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:

/*
 * Exclusive Disjunction
 */
#include <stdio.h>
 
int main()
{
    int p;
    int q;
    int r;
 
    printf("Enter a 1 or a 0 to xor:\n");
    scanf("%d", &p);
 
    printf("Enter a second 1 or 0:\n");
    scanf("%d", &q);
 
    r=p^q;
 
    printf("The xor of the values you've entered is: %d",r);
 
 
 
 
    return(0);
}

Experiment 1

Question

Can I pass a class pointer by reference?

Resources

Hypothesis

I feel a class pointer can be passed by reference just like a normal pointer

Experiment

I am going to write a program and pass a pointer by reference.

Data

  1 #include <iostream>
  2 
  3 
  4 Class A
  5 {
  6         public:
  7         A();
  8         function(int **pointer)
  9 
 10         private:
 11         int variable;
 12         int filler;
 13 };
 14 
 15 void A::functionint(int **points)
 16 {
 17         int *points;
 18 }
  1 #include <iostream>
  2 #include "class.h"
  3 
  4 using namespace std;
  5 
  6 int main()
  7 {
  8         class classVariable;
  9         class *classPointer = &classVariable;
 10 
 11         int variable1;
 12 
 13         function(&classPointer);
 14 
 15 return 0;
 16 }

Analysis

Based on the data collected:

  • My hypothesis was correct?
  • I had to pass the pointer to another pointer to pass by reference
  • the only shortcoming in the data is a small simple class was created just for the purpose of passing a pointer the experiment could have been done in a larger program and not a controlled environment

Conclusions

Ive discovered that class pointers can be passed by reference the same as a local pointer.

Part 2

Entries

Entry 1: October 5th, 2012

This week in data structures we took are linked list program and broke it up into separate functions in separate files and had them pass nodes between them and create a menu for the program that could call each function on demand we then compiled them linked them together and where evaluated on them .In discrete we worked on are set program and are naive sort program I found the linked list project was a very good refresher on funtions and passing parameters between functions such as nodes and pointers

Entry 2: October 20, 2012

This week in discrete we starting writing a set program that takes in members than outputs them in set notation now we are modifying and improving that program to be menu driving and perform operations such as union, intersection and difference. in data we are finishing are modular menu driven doubly linked list and we have also started on a linked list based stack program.

Entry 3: October Day, 2012

This is a sample format for a dated entry. Please substitute the actual date for “Month Day, Year”, and duplicate the level 4 heading to make additional entries.

As an aid, feel free to use the following questions to help you generate content for your entries:

  • What action or concept of significance, as related to the course, did you experience on this date?
  • Why was this significant?
  • What concepts are you dealing with that may not make perfect sense?
  • What challenges are you facing with respect to the course?

Remember that 4 is just the minimum number of entries. Feel free to have more.

Entry 4: October Day, 2012

This is a sample format for a dated entry. Please substitute the actual date for “Month Day, Year”, and duplicate the level 4 heading to make additional entries.

As an aid, feel free to use the following questions to help you generate content for your entries:

  • What action or concept of significance, as related to the course, did you experience on this date?
  • Why was this significant?
  • What concepts are you dealing with that may not make perfect sense?
  • What challenges are you facing with respect to the course?

Remember that 4 is just the minimum number of entries. Feel free to have more.

Keywords

data Keyword 2

stack push operation

Definition

The push operation adds a new element to the top of the stack (FILO)First in Last Out

References

List any sites, books, or sources utilized when researching information on this topic. (Remove any filler text).

* http://www.cplusplus.com/reference/stl/stack/push/

* http://en.wikipedia.org/wiki/Stack_(abstract_data_type)

data Keyword 2 Phase 2

array vs. linked list (pros/cons)

Definition

An array is a simpler, easier format for multiple value storage. You do not need to go threw the list in an array, you can use that element of the array. Linked lists have no benefits.

Demonstration

Demonstration of the indicated 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);
}

Alternatively (or additionally), 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$ 

discrete Keyword 2

proper subset

Definition

A subset is a set of members that when compaired with another set of members regardless of the sizes of either set it shares some but not all of the same members. a Proper subset is when the two sets of members are a subset but not equal

References

List any sites, books, or sources utilized when researching information on this topic. (Remove any filler text).

* http://en.wikipedia.org/wiki/Proper_subset#proper_subset

discrete Keyword 2 Phase 2

venn diagrams

Definition

A pictorial way to compare two things and also show what they have in common, often shown with two circles overlaying each other.

References

Demonstration

Demonstration of the indicated 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:

http://lab46.corning-cc.edu/~rthatch2/image.png

int main() {

  return(0);

} </code>

Alternatively (or additionally), 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$ 

Experiment 2

Question

Is an an array dynamic ?

Resources

I know from class and compile errors its not and thats what makes a linked list useful

Hypothesis

No memory needs to be allocated for the array so it has to be declared with a size and type

Experiment

write a program that uses a variable in the array decliration like so : int myArray[size]

Data

It actually compiled because its a logic error not a syntax error but the program did not work

Analysis

Based on the data collected: my hypothesis was correct but that outcome is not what I expected I for some reason expected compiler errors

Conclusions

although would be nice due to the way the c compiler allocates memory arrays must be declared with a size

Part 3

Entries

Entry 1: November Day, 2012

This is a sample format for a dated entry. Please substitute the actual date for “Month Day, Year”, and duplicate the level 4 heading to make additional entries.

As an aid, feel free to use the following questions to help you generate content for your entries:

  • What action or concept of significance, as related to the course, did you experience on this date?
  • Why was this significant?
  • What concepts are you dealing with that may not make perfect sense?
  • What challenges are you facing with respect to the course?

Remember that 4 is just the minimum number of entries. Feel free to have more.

Entry 2: November Day, 2012

This is a sample format for a dated entry. Please substitute the actual date for “Month Day, Year”, and duplicate the level 4 heading to make additional entries.

As an aid, feel free to use the following questions to help you generate content for your entries:

  • What action or concept of significance, as related to the course, did you experience on this date?
  • Why was this significant?
  • What concepts are you dealing with that may not make perfect sense?
  • What challenges are you facing with respect to the course?

Remember that 4 is just the minimum number of entries. Feel free to have more.

Entry 3: November Day, 2012

This is a sample format for a dated entry. Please substitute the actual date for “Month Day, Year”, and duplicate the level 4 heading to make additional entries.

As an aid, feel free to use the following questions to help you generate content for your entries:

  • What action or concept of significance, as related to the course, did you experience on this date?
  • Why was this significant?
  • What concepts are you dealing with that may not make perfect sense?
  • What challenges are you facing with respect to the course?

Remember that 4 is just the minimum number of entries. Feel free to have more.

Entry 4: November Day, 2012

This is a sample format for a dated entry. Please substitute the actual date for “Month Day, Year”, and duplicate the level 4 heading to make additional entries.

As an aid, feel free to use the following questions to help you generate content for your entries:

  • What action or concept of significance, as related to the course, did you experience on this date?
  • Why was this significant?
  • What concepts are you dealing with that may not make perfect sense?
  • What challenges are you facing with respect to the course?

Remember that 4 is just the minimum number of entries. Feel free to have more.

Keywords

data Keyword 3

Identification of chosen keyword.

Definition

Definition (in your own words) of the chosen keyword.

References

List any sites, books, or sources utilized when researching information on this topic. (Remove any filler text).

  • Reference 1
  • Reference 2
  • Reference 3

Binary Search Tree Phase 2

Definition

A binary search tree can also be named as a sorted/ordered search tree. Its a tree that has nodes that stem off into small search trees. It uses a linked list (doubly) that goes left and right. Numbers are placed in the nodes throughout the tree and with the correct algorithm it can traversed through going least to greatest or vice versa. Generally the left tree will have values that are less then the root (starting node) and the right tree will have values greater. The first node is called the root and the final nodes (depending on where it ends) are considered the leaves of the trees since that are the last on the tree.

References

data Keyword 3 Phase 2 Phase 2

tree rebalancing

Definition

In computer science, a self-balancing (or height-balanced) binary search tree is any node-based binary search tree that automatically keeps its height (number of levels below the root) small in the face of arbitrary item insertions and deletions. These structures provide efficient implementations for mutable ordered lists, and can be used for other abstract data structures such as associative arrays, priority queues and sets.

References

List any sites, books, or sources utilized when researching information on this topic. (Remove any filler text).

  • Reference 1: google.com
  • Reference 2:wikipedia.com
  • Reference 3: yahoo.com

Demonstration

Demonstration of the indicated 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);
}

Alternatively (or additionally), 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$ 

Demonstration

Demonstration of the indicated 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);
}

Alternatively (or additionally), 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$ 

discrete Keyword 3

Identification of chosen keyword.

Definition

Definition (in your own words) of the chosen keyword.

References

List any sites, books, or sources utilized when researching information on this topic. (Remove any filler text).

  • Reference 1
  • Reference 2
  • Reference 3

discrete Keyword 3 Phase 2

Turing machine

Definition

A Turing machine processes symbols on a strip of tape with a set of rules. A Turing machine is not really meant for practical use but more to help computer scientists understand the limits of mechanical computation. A hypothetical device to represent a computing machine.

References

List any sites, books, or sources utilized when researching information on this topic. (Remove any filler text).

discrete Keyword 3 Phase 2 Phase 2

Identification of chosen keyword.

Definition

Definition (in your own words) of the chosen keyword.

References

List any sites, books, or sources utilized when researching information on this topic. (Remove any filler text).

  • Reference 1
  • Reference 2
  • Reference 3

Demonstration

Demonstration of the indicated 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);
}

Alternatively (or additionally), 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$ 

Demonstration

Demonstration of the indicated 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);
}

Alternatively (or additionally), 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$ 

Experiment 3

Question

What is the question you'd like to pose for experimentation? State it here.

Resources

Collect information and resources (such as URLs of web resources), and comment on knowledge obtained that you think will provide useful background information to aid in performing the experiment.

Hypothesis

Based on what you've read with respect to your original posed question, what do you think will be the result of your experiment (ie an educated guess based on the facts known). This is done before actually performing the experiment.

State your rationale.

Experiment

How are you going to test your hypothesis? What is the structure of your experiment?

Data

Perform your experiment, and collect/document the results here.

Analysis

Based on the data collected:

  • Was your hypothesis correct?
  • Was your hypothesis not applicable?
  • Is there more going on than you originally thought? (shortcomings in hypothesis)
  • What shortcomings might there be in your experiment?
  • What shortcomings might there be in your data?

Conclusions

What can you ascertain based on the experiment performed and data collected? Document your findings here; make a statement as to any discoveries you've made.

opus/fall2012/rthatch2/start.txt · Last modified: 2012/12/31 04:33 by 127.0.0.1