top of page

Workshop 3- Week beginning 25th October 2021

  • Sadie Read
  • Nov 3, 2021
  • 2 min read

While having a quiet day at work I started the workshop with sorting all the variables with their correct data types into classes. See the following pictures to see this work.





Once home from work I declared them all to have default values within the classes I had sorted

I then went through and created even more classes such as position and name classes as these are seen in multiple classes and it’s suggested under step 6 that we do this.

I then played around with the dot operator which is something I had played around in with the consolidation week work task so this was not anytime brand new to me but it was helpful to have the practice playing around with them.

I had some issues with the dot operator not working so I put a screen shot of the error o had occurring into discord. The error was as follows


I had tries to use the dot operator with multiple functions, but I kept getting the same error.

After then re-reading my notes, I realised where I had gone wrong


This is how it should be written. NO BRACKETS!!

I then created one stadium, two teams and two players. This can all be seen in the attached zipped code folder. This was easy once I had corrected my use of the dot operator. While having a google I found out about pointers and dot operators working together do this is likely something I’ll investigate.


Finally, I had to create a diagram that showed the classes of my variables but this time for my final project. I want to create a thieving game where pirates must board other ships and fight them for their treasure. I therefor had to create some variables around this.

Recent Posts

See All

Comentários


Post: Blog2_Post
  • Twitter
  • YouTube

©2020 by Sadie Read. Proudly created with Wix.com

bottom of page