Week 3: Classes and improvement
|
This week we have started using Classes. Because the course is moving forward in a high speed I feel like I need more time to do each exercise before I can fully understand them. The exercises that I have done this week is a few basic Programs that uses classes and then I did a Fahrenheit, Celsius Kelvin converter and a program that can calculate the time in seconds since midnight here you can also add or remove time. Now I am working on program that is going to include a deck of playing cards and you will be able to draw cards, shuffle them and swap cards that you hold. Last week I posted a code that I have also been working on and now it is improved. What I did was to first of all clean the code up a bit. The I created a function and what it does is that I can at the start of the program I can choose how big the array will be. The array is filled with random numbers between 1-100 that i then can sort. Here is my Temperature converter as pdf. and here is my improved Arraysorter from last week. |