Changes

Jump to: navigation, search

Team 42 Contributions

1 byte removed, 21:07, 19 November 2012
no edit summary
Submitted by Team42
<br><br>
 
==[[Assignment 2 (Release 0.1): Q & A | Assignment 2]]==
 
<br>
'''Q:''' Are we able to toggle the border's visibility or are we only able to toggle the frame's visibility? If yes, the constructor does not receive any information about the visibility of the border, do we assume that the border is visible?<br>
'''Question Submitted by:''' Gideon Thomas and Marie Karimizadeh<br>
'''A:''' Yes, we do get to toggle the border visibility by using the
<source lang="cpp"> void bordered(bool);</source>method which "sets the visibility of the border to the value received". The frame has no border if it is a fullscreen frame, should be safe to assume it has a border if it is not fullscreen (unless otherwise specified).
'''Answer Submitted by:''' Team42<br><br>
 
'''Q:''' In the functions void row(int) and void col(int), are we receiving the values of row and column respectively that are relative to the parent frame or relative to the console screen?<br>
'''Question Submitted by:''' Gideon Thomas and Marie Karimizadeh<br>
'''A:''' In a CFrame class description most modifiers came in pairs with queries, like
 
<source lang=cpp>
 
void row(int) - sets the top row to the value received
 
int row() const - returns the top row position relative to the parent frame, if any; 0 if fullsreen
 
 
 
void col(int) - sets the left column to the value received
 
int col() const - returns the left column position relative to the parent frame, if any; 0 if fullsreen
 
</source>
 
So it's safe to assume that modifiers void row(int) and void col(int) will receive coordinates of top-left corner (row and col respectively) of the current frame relative to the parent frame.
<br>'''Answer Submitted by:''' 010101000110010101100001011011010011010000110010 <br>
 
 
 
'''Q:''' Since we can have a potential of unlimited frames within frames, how can we tell how many frames are in the console? (how far down in the frames within frames) <br>
'''Question Submitted by:''' Wesley Hamilton and Joe Higginson<br>
 
'''A:''' You can use this simple function to calculate the number of parents within parents of the current frame:
 
<source lang="cpp">
 
int SomeClass::number_of_parents(){
 
return (parent ? 1+parent->number_of_parents() : 0);
 
//"parent" is a reference to the parent of the current frame
 
}
 
</source>
 
But you can't know how many children the current frame has, unless you create special class members to keep/calculate that number.
<br>'''Answer Submitted by:''' [[Team 42 Contributions | Team0x2Au]] <br>
 
'''Q:''' How to get size of an array without storing the size anywhere? <br>
'''A:''' There are several ways to get the length of an array without explicitly knowing its length. The C method is as follows
</source>
For any of these methods, to be able to work with the data afterwords simply use a common delimiter when originally generating the file, and then you can use methods like[http://www.cplusplus.com/reference/clibrary/cstring/strtok/ strtok] (for char array), [http://www.cplusplus.com/reference/string/string/find/ .find] combined with[http://www.cplusplus.com/reference/string/string/substr/ .substr] (string class) or use it as a vector (if that's required).<br>Submitted by Team42.<br><br>
 
==[[Assignment 2 (Release 0.1): Q & A | Assignment 2]]==
 
<br>
'''Q:''' Are we able to toggle the border's visibility or are we only able to toggle the frame's visibility? If yes, the constructor does not receive any information about the visibility of the border, do we assume that the border is visible?<br>
'''Question Submitted by:''' Gideon Thomas and Marie Karimizadeh<br>
'''A:''' Yes, we do get to toggle the border visibility by using the
<source lang="cpp"> void bordered(bool);</source>method which "sets the visibility of the border to the value received". The frame has no border if it is a fullscreen frame, should be safe to assume it has a border if it is not fullscreen (unless otherwise specified).
'''Answer Submitted by:''' Team42<br><br>
 
'''Q:''' In the functions void row(int) and void col(int), are we receiving the values of row and column respectively that are relative to the parent frame or relative to the console screen?<br>
'''Question Submitted by:''' Gideon Thomas and Marie Karimizadeh<br>
'''A:''' In a CFrame class description most modifiers came in pairs with queries, like
 
<source lang=cpp>
 
void row(int) - sets the top row to the value received
 
int row() const - returns the top row position relative to the parent frame, if any; 0 if fullsreen
 
 
 
void col(int) - sets the left column to the value received
 
int col() const - returns the left column position relative to the parent frame, if any; 0 if fullsreen
 
</source>
 
So it's safe to assume that modifiers void row(int) and void col(int) will receive coordinates of top-left corner (row and col respectively) of the current frame relative to the parent frame.
<br>'''Answer Submitted by:''' 010101000110010101100001011011010011010000110010 <br>
 
 
 
'''Q:''' Since we can have a potential of unlimited frames within frames, how can we tell how many frames are in the console? (how far down in the frames within frames) <br>
'''Question Submitted by:''' Wesley Hamilton and Joe Higginson<br>
 
'''A:''' You can use this simple function to calculate the number of parents within parents of the current frame:
 
<source lang="cpp">
 
int SomeClass::number_of_parents(){
 
return (parent ? 1+parent->number_of_parents() : 0);
 
//"parent" is a reference to the parent of the current frame
 
}
 
</source>
 
But you can't know how many children the current frame has, unless you create special class members to keep/calculate that number.
<br>'''Answer Submitted by:''' [[Team 42 Contributions | Team0x2Au]] <br>
==[[Assignment 2 (Release 0.1): Q & A | Possible/Challenging Enhancements]]==

Navigation menu