User Tools

Site Tools


opus:fall2012:mkelly23:part2

Part 2

Entries

Entry 1: October 3rd, 2012

Today was the day I attempted my first “Knowledge-Based Assessment” for Data Structures. I wasn't sure what to expect, and felt relieved to see just four questions. Unfortunately, I realized that I did not know how to properly answer two of the questions. I don't remember us going over the correct answers in class, which could have benefited me greatly.

On a more upbeat note, I was able to work through my Menu-Driven, singularly linked list program in class. I try to work through what I can of the programs before asking for help, but am usually unable to get through errors properly without help.

Entry 2: October 10th, 2012

In Data Structures, today was all about “stacks.” Stacks are another data structure that can be used for storing and accessing data. As I learned, they are very similar to the linked lists that I have been working with for the past several weeks. In stacks, data is stored one node at a time and accessed from the top, down. This concept of stack management is called “FILO” or First In, Last Out.

As data is stored into a node, it becomes “pushed” onto the stack, and added on top of the node prior. In order to access a lower node in the stack, you must first “pop” the nodes above, one node at a time. Stack overflow occurs when you are trying to push a node onto a full stack, and stack underflow occurs when trying to pop a node off of an empty stack.

A heads up was given on the future assignment for stacks. The four goals were to:

1) Understand the container 2) Have a working implementation of the container (Ex. nodes) 3) Understand the data structure 4) Implement it (manipulate the append/delete functions from linked lists)

Entry 3: October 11, 2012

TThe class started off with a polite “coming to Jesus” talk from Matt, in regards to proper code indentation. I knew that indenting was something that I struggled with, oftentimes mixing up the indenting guidelines for my Java class with those of C programming language. Thankfully, Matt also introduced me to his indenting program, that I am now able to use to properly indent code (for the ever-important grading purposes).

We also dipped into understanding functions and their involvement in C. Matt informed us that functions will play a crucial role in Recursion (to be learned at a later date). I have struggled with functions (parameters, calling functions, etc) since my days in C/C++. I learned to take a different/more mathematical approach to functions, which helped me grasp a better understanding. Just as in math, all functions return one value. Procedures, on the other hand, return zero values.

Entry 4: October 24th, 2012

The friendly, neighborhood ungraded Knowledge Assessment made another appearance today. The questions were very similar to the first assessment taken at the first of the month, with slightly different data and results. Going into this “test,” I felt somewhat better about how to break down the code to find an answer close to what is deemed “correct.” I still do not have a firm understanding of the basics of C, in my opinion, which causes a great concern for me.

At this point in the semester, I am still unable to complete assignments out of the classroom, as I have a disconnect with the language. Matt and Jacob continue to be my lifesavers, and try their best to not just give me the answer. My in-class neighbor certainly means well, but I find myself struggling with keeping up in class and trying to help him on his assignments concurrently. I worry that I will finish the semester with a slightly-above-amateur level understanding of C programming, leaving me missing a vital job skill for the workforce I hope/need to enter in May.

Keywords

data Keyword 2

stack (LIFO or FIFO?)

Definition

LIFO is an acronym that stands for “Last In, First Out.” When it comes to stacks, functions and procedures that are running become stacked on top of one another in memory (called a “push”). When an item is removed from the stack (or “popped”), it is removed from the top down. This computing action allows for stack integrity, and limits access/insertion.

FIFO means “First In, First Out.” In this regard, data and processing are handled on a first come, first serve basis through usage of a queue (or linear data structure). The first process in line is handled before any others are, and then the next, and so on.

References

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

data Keyword 2 Phase 2

doubly linked list

Definition

A doubly linked list a a method of storing data.
The manner in which the data is stored is by a series of structs. There will be a variable that will always point to the first struct, and if you want there can be one to always point to the last struct.
Every struct has a minimum of three variables contained within - the data value, a pointer to the struct after it, and a pointer to the struct before it. These pointers is how one will navigate these structs, it is how they are linked together.

References

No references for this keyword.

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

union

Definition

A union, when referred to in Computer Science, is defined as a value that can have several formats. Also, a union can be a data structure that contains a variable holding a union value.

A union's primary function is to conserve space in both code and in memory. As is the case with data structures, unions are not limited to one primitive data type at a time.

References

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

discrete Keyword 2 Phase 2

mutual exclusion

Definition

Mutual Exclusion is the method by which one can ensure that a region of memory cannot be accessed by two processes at the same time.
In logic terms, it can described as possibilities where you cannot have more than one be true at a time.

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:

/*
 * 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 2

Question

How to implement a basic scoring program for Fantasy Football?

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

In a continuance of my first experiment, I have decided to work on just a small portion of the overall goal. My intentions are to create a short program that will accept a player's statistics, and perform a quick mathematical computation. The result of the computation will be a point value which represents the player's overall performance in that field.

Experiment

To test my hypothesis, I will input the following data into the program for a particular player:

RB1 Stats - 150 yards rushing, 1 TD, 1 fumble.

The scoring is as follows:

For every 10 yards rushing = 1 point For every touchdown (TD) = 6 points For every turnover (fumble) = 2 points

Expected output: 19 points

Data

I entered the data into my FantasyFB program, as specified in my Experiment. The expected end result was:

150 yards rushing = 15 points 1 touchdown = 6 points 1 fumble = -2 points

Total points: 15

Analysis

Based on the data collected:

  • My hypothesis was correct. I was able to quickly (and linearly) write a simple program to calculate point totals for a particular player's stats. Moving forward, I will need to adjust my program to accept more than one player's statistics and calculate multiple point values. Those values will need to be stored in an array or structure that can easily be accessed for comparison against an opposing player's numbers.

Conclusions

As stated earlier, I was able to quickly and effectively calculate a point value from inputting one player's stats. My next goal is to build on this program, to accept more players input. Eventually, I hope that my program can be used to calculate a winner between two users and their team's overall point total.

opus/fall2012/mkelly23/part2.txt · Last modified: 2012/10/31 21:39 by mkelly23