Table of Contents

Part 2

Entries

October 6, 2011

Today, I worked on the first project and got a good amount done. I am still not sure how to calculate the data types' ranges or amount of unique values available. I know these values but I am not sure how the calculations are taking place based on the examples given.

October 13, 2011

Today, I finished my first project covering data types. I had to do a bit of researching to learn about data types and their specific values. I did learn a few things about the limits header, as covered in my project. I had trouble figuring out how to calculate the values needed in the way the examples did it, so I will need to look into that to make sure I can calculate correctly.

October 20, 2011

I have read through the rest of chapter 3 and some of chapter 4 up to this point. I have been dealing with time constraints between work and classes which has limited my progress slightly recently.

October 29, 2011

I have been viewing a few tutorials that Dalton recommended to me on Youtube for C++. They seem to be quite informative and helpful for some key concepts. The channel is “thenewboston” who releases a number of tutorials and lectures for numerous topics such as chemistry, math, and programming topics. On another note, I have been thinking about what type of concept to explore in my next project, which I will probably start very soon.

cprog Topics

Multi-dimensional arrays

A Multi-dimensional array is “an array of arrays”. It can be described as a table of values, or multi-variable, as compared to a normal array which only has one independent variable. All values have to be the same data type.

File Access (Read, Write, Append)

File Access in C is managed through using a FILE pointer with the fopen function. The modes for reading, writing, and appending are 'r', 'w', and 'a', respectively.

Structures

Similar to an array, structures handle a collection of variables, and can hold different data types. Structures can be used in more ways than arrays.

typedef, enum, union

typedef is a declaration that can be used to define different variable types.

enum is a declaration used for variables that are limited to certain values.

union is similar to structures except all the fields are in one location.

Command-line arguments

Arguments are user-entered information (in the command line) when prompted, which are usually used for calculation or storage.

Namespaces

namespaces can be used to define multiple things under one category as a “sub-scope”.

Type Casting Operators

Type Casting is the method of converting a variable from one data type to a different data type.

Templates

Templates are functions that can be used to create functionality for multiple data types or classes without repeating code. Parameters are used to manage templates.

Abstract Base Class

As the word suggests, an Abstract Base Class is a class that is abstract. It is used as a class and it can not be made as an object. It is used to define a class that “has one or more pure virtual member functions”.

Function Overloading

Overloading a function is making multiple declarations of the same function name in the same scope. Doing this causes the program to select the best function when you call said overloaded function.

Operator Overloading

Operator overloading is the overloading of an operator (such as +, -, *, etc.), to manipulate a given operation to be closer to the desired solution of a problem.

Multi-file programs

Some programs are split into multiple files if the number of functions in the said program exceeds what the user desires. Having too many functions or coding in one file can put a strain on file size and/or make it difficult for the user to read. Creating multiple files for one program can help to maintain this if there is too much coding for one file. These multiple files can then be linked together to compile into a single program, rather than compiling a single file.

cprog Objective

Objective

This objective is to understand the difference between procedural and object-oriented languages.

Method

To understand the difference between these types of languages, it is necessary to express what defines each of these types of languages, and also to express the differences and similarities between them.

Measurement

Procedural programming languages create a program that is run step by step, or in sequence. Object-Oriented programming languages create a program that holds objects which can be called based on how the coding allows it. Both of these types of programming languages can be used to accomplish very similar goals and problem solving. The nature of object-oriented programming allows it to often require less coding for a given problem than a procedural program would, usually due to repeated coding in procedural.

Analysis

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

I believe I understand the difference between the two types of languages well.

I could practice both types of languages in order to become more familiar with them.

Examples could have been used but I wasn't able to think of any.

Employing this enhancement would be efficient if a problem were given.

Object-oriented and procedural programs are more significant in considering problems and not languages, and the objective should reflect this more. They are more of a mindset or philosophy in approaching problems than anything else.

Experiments

Experiment 1

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:

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.

Experiment 2

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:

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.

Retest

If you're doing an experiment instead of a retest, delete this section.

If you've opted to test the experiment of someone else, delete the experiment section and steps above; perform the following steps:

State Experiment

Whose existing experiment are you going to retest? Prove the URL, note the author, and restate their question.

Resources

Evaluate their resources and commentary. Answer the following questions:

Hypothesis

State their experiment's hypothesis. Answer the following questions:

Experiment

Follow the steps given to recreate the original experiment. Answer the following questions:

Data

Publish the data you have gained from your performing of the experiment here.

Analysis

Answer the following:

Conclusions

Answer the following: