Open main menu

CDOT Wiki β

Changes

Assignment 1: Q & A

178 bytes added, 15:05, 18 September 2012
no edit summary
'''Q:''' In the program, we assume that the screen size is fixed. How would we change the program such that it prints the string for a variable field length i.e. the screen size can be changed at the user's discretion?<br>
'''A:''' ''Post Answer here''You can retrieve the screen size with console.getCols(); (or getRows() for rows) and use that value in your calculations for field-length, such as fieldLen=console.getCols()-4; (Submitted by Team42)<br>
'''Submitted by:''' Gideon Thomas and Marie Karimizadeh<br><br>