I started reading the fourth Unit. Firstly, I finally understood the main() method, with the argument String[] args which is an array of Strings named args. It made more sense looking at it that way since I could not understand why they used that initially. Since I learned a bit about subroutines on my own by doing a bit of research, I already understood the general syntax of a method. Although, I found it useful to know that a Public subroutine could be used only in its package, while a Private subroutine could be used only in a class. I also learned a bit more about how to use variables, and how to use them as local variables inside parameters or using them to place inside the subroutine as a parameter. I had a little trouble with that before reading this unit, which helped me work back on the assignment. I ended up turning the input value into a global variable! Feels good to keep learning and it is starting to feel like coding will be a long-time passion of mine. I had no particular reason to change the code other than to apply what I had learned to my assignment. Return is interesting but with Python, I already worked with this. This course is a lot more object-oriented and class-oriented as I can see and I see the effect of this through the global variables and working with classes, which I didn't get the chance to do with python in my course (I learnt about OOP in Python on my own by searching through the internet). I felt the styling of variables to be a bit useless, I don't really see the meaning of using different styles for different types of variables, like-named constants or regular variables. Like using fully upper cases and an underscore to name named constants. I'm definitely going to be using the "var" now, since the computer sort of "decides" what variable it ends up being. Like saying, "var num = 0.05" would turn the num variable into a type double, with the value of 0.05. This means when I'm not sure which type to use, I can simply use the var and the computer will sort of know. Also, the scope rules were sort of obvious to me, since Python had its own scope rules. Working on the mosaic problem was a fun way to approach creating subroutines for your program. I felt like I could easily position myself doing the same thing, seeing what tasks are necessary to do, and creating subroutines to accomplish those tasks, and having subroutines using other subroutines as well.
The Landing is a social site for Athabasca University staff, students and invited guests. It is a space where they can share, communicate and connect with anyone or everyone.
Unless you are logged in, you will only be able to see the fraction of posts on the site that have been made public. Right now you are not logged in.
If you have an Athabasca University login ID, use your standard username and password to access this site.
We welcome comments on public posts from members of the public. Please note, however, that all comments made on public posts must be moderated by their owners before they become visible on the site. The owner of the post (and no one else) has to do that.
If you want the full range of features and you have a login ID, log in using the links at the top of the page or at https://landing.athabascau.ca/login (logins are secure and encrypted)
Posts made here are the responsibility of their owners and may not reflect the views of Athabasca University.