Chapter 3 Reflection
1. In chapter 3 I learned how to create functions for forms through more complex codes, specifically codes using variables declared through the Dim statement. In addition to using the code, I've noticed how difficult it is to code because of how some codes require a lot of time before they can operate properly. I've also learned that it is possible to set a default button by using the AcceptButton property under the form's property section. The chapter also taught me how to make use of the load screen and how it is coded onto the form. The lab has also taught me how the tick bar works, because no lab before has ever made use of the tick bar.
2. This lab shows that I learned how to use variables for coding through the math functions used to complete the lab and the types of variables I used. This is most evident by how some types of variables may not necessarily work with a math function because it cannot be a string, such as how decimal variables cannot be directly set to equal something unless converted to a string. Speaking of conversion, this lab also demonstrates how I learned to convert types of variables into other variables so that the math function can be completed.
3a. Something that was difficult from this chapter was having certain variables work with others in a math function. This mostly occurred when I tried to use a decimal variable with a string variable in math functions. Since some numbers require input from a user, the numbers are considered as strings, a type that the decimal variable cannot work with. This led to many problems when constructing programs/functions during the labs I did. Another problem was figuring out the math functions or formulas needed to have the form/program do what is requested of the question or client.
3b. How I worked through it was learning how to convert variables from what type to a different type. To have a decimal work with a string, I would have to convert the string into a decimal or a decimal AND a string into integers. This way, I would be able to have the numbers, including the ones inputted by the user, work with each other when code involving them is running. This does take time, since other complications can arise, but I was able to pull through them. With the math functions, it became a matter of searching through what I've learned in math class or consulting my classmate to figure out a math formula or function that would best work to get the desired result.