My Two Projects for Finals
So it has been almost a month since my last post. It's been a busy time. I have to dealt with final projects in all of my classes and had to study for various exams. With Thanksgiving and a relative's graduation, I had to also do various things with my family. One other thing I had to do is my programming class' final project.
So for my first programming class I had to create two programs:
Number to Word Translator
This is a simple program to which takes a number, turns it into a word, adds a currency name at the end, and displays it in an ordered list. It works with these basic steps:
Nevertheless, I've decided to do keep with English and resolved the issue by having a special function deal with getting the names of these certain numbers.
Another issue I had was in putting the number and names into an array, sorting them, and keeping them together. It was here I learnt about sorted dictionaries in VB.Net. I have decided to use this for the program so all the numbers inputted shall be sorted from smallest to largest.
With those two problems resolved, the rest was a breeze. I also did some minor designing. I found it to be quite a good program.
Base Translator
This program will take an inputted number from a certain base chosen by the user, translate it to base 10, and translate it to a another base chosen by the user. That's it basically, the only other things it does is validate the inputs and display the values.
There is little specific to the process. This program simply follows the steps of converting to and from binary, but instead of just binary it does any base from 1 to 36. It goes from base 1, which is only 1s representing tally marks, to base 36, using all numbers 0-9 and all letters A-Z. As far as I'm aware, it should be accurate for all translations.
I will likely not post these two projects to Github. If I do, I will likely have these programs redone in some other code and display such as with HTML and JavaScript. These are also likely the last Visual Basic programs I will make. While I may appreciate the easy way of designing a program in VB and a coding language that does not require semicolons at the end of each line, I do not see much future use in it and my future programming classes won't use VB.
With myself now on break, I will likely be able to keep up with posting and not have a massive gap as with November. I do have some ideas to do in coding, though it may be awhile until my I do anything in an engine like Unity again. As for now, farewell.
So for my first programming class I had to create two programs:
- One that gets a number in its numerical form and then state the number as words instead of numbers.
- One which will translate a number in one base and translate it to another base, such as translating a number from binary to hexadecimal.
Number to Word Translator
This is a simple program to which takes a number, turns it into a word, adds a currency name at the end, and displays it in an ordered list. It works with these basic steps:
- Get the inputted string
- Validate the input; making sure the input can be a number, is greater than 0 and less than 1 billion, and will not cause overflow or argument errors
- Find the amount of digits in the number
- For the amount of digits in the number, get the current number at each digit, and run a function to find the word it should be given
- A special function is given to numbers in the tens, as their names are different from other numbers
- Once the number's word is found, add it to a string
- Add the number and the string to a sorted dictionary
- For every item in the sorted dictionary, add the number and the string to a list box
Nevertheless, I've decided to do keep with English and resolved the issue by having a special function deal with getting the names of these certain numbers.
Another issue I had was in putting the number and names into an array, sorting them, and keeping them together. It was here I learnt about sorted dictionaries in VB.Net. I have decided to use this for the program so all the numbers inputted shall be sorted from smallest to largest.
With those two problems resolved, the rest was a breeze. I also did some minor designing. I found it to be quite a good program.
Base Translator
This program will take an inputted number from a certain base chosen by the user, translate it to base 10, and translate it to a another base chosen by the user. That's it basically, the only other things it does is validate the inputs and display the values.
There is little specific to the process. This program simply follows the steps of converting to and from binary, but instead of just binary it does any base from 1 to 36. It goes from base 1, which is only 1s representing tally marks, to base 36, using all numbers 0-9 and all letters A-Z. As far as I'm aware, it should be accurate for all translations.
I will likely not post these two projects to Github. If I do, I will likely have these programs redone in some other code and display such as with HTML and JavaScript. These are also likely the last Visual Basic programs I will make. While I may appreciate the easy way of designing a program in VB and a coding language that does not require semicolons at the end of each line, I do not see much future use in it and my future programming classes won't use VB.
With myself now on break, I will likely be able to keep up with posting and not have a massive gap as with November. I do have some ideas to do in coding, though it may be awhile until my I do anything in an engine like Unity again. As for now, farewell.
Comments
Post a Comment