This site requires JavaScript, please enable it in your browser!
Greenfoot back
pr2alede
pr2alede wrote ...

2013/11/18

Declaring variables

pr2alede pr2alede

2013/11/18

#
Hi. I'm currently teaching a computer gaming module and as part of the criteria the students have to design a game. One of the requirements of the course states that students have to - 'determine appropriate data types for a computer game and show how they are declared'. Any ideas what the students could produce in order to answer this?
SPower SPower

2013/11/18

#
I think it's a weird question: it's really a very minor issue compared to making a game in general. But this would be a possible answer:
// the current level
private int level;
// the score
private int score;
// the health left
private int health;
davmac davmac

2013/11/18

#
pr2alede, sounds like this would be a good question for the Greenroom. However:
determine appropriate data types for a computer game and show how they are declared
I guess what is being asked for here is appropriate class declarations for their game, with the variables and methods (method headers rather than complete methods). What exactly those might be would depend on the nature of the game being developed, of course. I'm guessing that the requirements is essentially asking that:
  • When students are given a description of a game:
  • they are able to determine what data is or might be involved in the game system
  • they can write suitable declarations for such data items in code.
I highly recommend repeating your question in the Greenroom site, however.
pr2alede pr2alede

2013/11/20

#
Thankyou
You need to login to post a reply.