======Part 2====== =====Entries===== ====Oct 6th, 2011==== I have gotten confirmation on my project for RPS 101 it seems like the way I have been thinking it will involve quite a lot of selection statements and a bit of repetition in the program. Hopefully it doesn't cause me too much trouble. ====Oct 14th, 2011==== I have learned a lot about C programming since last month and im getting used to how C syntax work but some of it is still alitttle hard for me. Because of me working on the rock paper scissors game I have had to go through a lot of syntax that I haven't used before and this made me essentially learn it a bit harder than I would have liked too but besides that it is all good ====Oct 20th, 2011==== Working on my project has been very tiresome to an extent just because of the amount of if statements and selection I have to you I have been thinking that because dude to time I may have to reduce the number if selections by a lot. Ether to the RPS 5 or the 20 hopefully I will get my project done relative soon th. It has been hard with work and programing ====Oct 31, 2011==== I have almost finished my RPS program and I shortened it down to a regular rps program but plan on expanding it. I should be done with the full program buy tomorrow. Also i'm trying to finish up my opus but it seems like my computer likes to mess with me and have random network outages =====cprog Topics===== ====Type Casting==== Converting an expression of a given type into another type is known as type-casting. We have already seen some ways to type cast short a = 10000 int b b = a ====Selection Structures ==== A selection Structure is a way of making decisions based on information you already have in a program. The most known is the if statement {{:opus:fall2011:csteve16:session5-if.png?200|}} {{:opus:fall2011:csteve16:session5-if_flowchart.png?200|}} ====Repetition/Iteration Structures==== A repetition structure is an easy way to repeat a process in a program without writing it multiple times ====Code stages==== There are 4 main stages 1.preprocessing-In this stage all the preprocessor commands (i.e. #include, #define...anything with a hash) are dealt with. The relevant files and macros are pasted into the appropriate places (so you have all the function prototypes you need). 2.Compile At this stage the program is translated into assembly code. The syntax of the C++ code is analyzed and if there are mistakes (missing semicolons, extra brackets, missing function definitions) the compiler will flag an error. 3.Assembler This stage translates the assembly code into machine code and produces object files. 4.Linker This stage attaches any important libraries and builds the final executable. ====Namespaces==== is an abstract container or environment created to hold a logical grouping of unique identifiers or symbols ====Type Casting Operators==== There are a few casting operators dynamic_cast   Used for conversion of polymorphic types. static_cast   Used for conversion of nonpolymorphic types. const_cast   Used to remove the const, volatile, and __unaligned attributes. reinterpret_cast   Used for simple reinterpretation of bits. safe_cast    Used to produce verifiable MSIL. ====Abstract Base Class==== An abstract class is a class that is designed to be specifically used as a base class. An abstract class contains at least one pure virtual function. You declare a pure virtual function by using a pure specifier (= 0) in the declaration of a virtual member function in the class declaration. ====Templates==== Function templates are special functions that can operate with generic types. This allows us to create a function template whose functionality can be adapted to more than one type or class without repeating the entire code for each type. ====Function Overloading ==== You overload a function name f by declaring more than one function with the name f in the same scope. The declarations of f must differ from each other by the types and/or the number of arguments in the argument list. When you call an overloaded function named f, the correct function is selected by comparing the argument list of the function call with the parameter list of each of the overloaded candidate functions with the name f. A candidate function is a function that can be called based on the context of the call of the overloaded function name. ====Operator Overloading==== The operator keyword declares a function specifying what operator-symbol means when applied to instances of a class. This gives the operator more than one meaning, or "overloads" it. The compiler distinguishes between the different meanings of an operator by examining the types of its operands ====Inheritance==== Inheritance is a mechanism of reusing and extending existing classes without modifying them, thus producing hierarchical relationships between them. ====Polymorphism==== Through inheritance, a class can be used as more than one type; it can be used as its own type, any base types, or any interface type if it implements interfaces. This is called polymorphism. In C#, every type is polymorphic. Types can be used as their own type or as a Object instance, because any type automatically treats Object as a base type. =====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: * 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. ====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: * 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. ====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: * Do you feel the given resources are adequate in providing sufficient background information? * Are there additional resources you've found that you can add to the resources list? * Does the original experimenter appear to have obtained a necessary fundamental understanding of the concepts leading up to their stated experiment? * If you find a deviation in opinion, state why you think this might exist. ===Hypothesis=== State their experiment's hypothesis. Answer the following questions: * Do you feel their hypothesis is adequate in capturing the essence of what they're trying to discover? * What improvements could you make to their hypothesis, if any? ===Experiment=== Follow the steps given to recreate the original experiment. Answer the following questions: * Are the instructions correct in successfully achieving the results? * Is there room for improvement in the experiment instructions/description? What suggestions would you make? * Would you make any alterations to the structure of the experiment to yield better results? What, and why? ===Data=== Publish the data you have gained from your performing of the experiment here. ===Analysis=== Answer the following: * Does the data seem in-line with the published data from the original author? * Can you explain any deviations? * How about any sources of error? * Is the stated hypothesis adequate? ===Conclusions=== Answer the following: * What conclusions can you make based on performing the experiment? * Do you feel the experiment was adequate in obtaining a further understanding of a concept? * Does the original author appear to have gotten some value out of performing the experiment? * Any suggestions or observations that could improve this particular process (in general, or specifically you, or specifically for the original author).