Fichas
visual web

Fichas del conjunto (40)
- 1What is programmingusing words and symbols to communicate with computer
- 2What is a function?section of code that does one thing well
- 3what is a class file?text file that contains function for a specific task
- 4if you created a class to represent an address what might it’s properties be?Address number post code etc
- 5what is an object?name given to class file to access methods and properties
- 6what is instantiation?act of creating an object from a clas
- 7what are methods and properties?methods- tells object to perform an action( counting)
properties- allows to read and change settings of an object - 8what are the following made from •properties •methods •constructors •event handlers•properties - get and set accesor
•methods- functions
•constructors- function in class file
•event handlers - interaction with a function - 9what is a sequencerunning a code in order

- 10What is selection+exampleline of code that runs if certain conditions are met

- 11what is repetition + exampleexecution of same line code several times(loop)

- 12what is proceduralisation and examplelong word to describe making functions

- 13what do parameters do?gives us mechanism for copying data from one function to another
- 14along with a suitable example what is a function return valueresult of a function
{ return RecordCount;} - 15Public function for delete methods that accepts single parameter of delete info addressno has to have boolean return typepublic boolean delete (int32 AddressNo)
//code goes here/below
Return true; - 16write section of code that creates an instance of an object called addresses based on the class clsAddressCollectionclsAddressCollection Addresses =newclsAddressCollection();
- 17what is the difference between getter and a settergetter retrieved data stored in fields of an object of a class
setter assigns the value or initialise girls of an object of a class - 18along with a suitable example explain what is a variablevariable is a named section of RAM that stores data of specific data type
string ErrMsg - 19What does declaring a variable do?makes them easier to find
declaring a variable defies its data type - 20Write suitable control IDs for the following text box first name label store errors button save data list box display students-txtFisrtName
-lblError
-btnSaveData
-lstDisplayStudents - 21does the computer care what names we give to our objects controls and variables? explain whyobjects controls and variables must have correct names throughout for computer to understand and process. If you put a spelling error or caps on computer will do understand it and it will not work
- 22what is the = sign called and what does it do?assignment operator copies data from one source to destination
- 23declare a variable to store a persons first name initialised with the string”john”string FirstName = “John”;
- 24Declare a variable to store a persons age initialised with the age 23int32 age=“24”
- 25declare a variable to store a telephone numberstring TelephoneNo;
- 26declare a variable to store the price of a kettledecimal KettlePrice;
- 27write a section of code that assigns the value 20 to a variable called ClassSizeint32 ClassSize;
ClassSize = 20 - 28write a section of code that assigns the name “Fred Bloggs” to a variable called StudentNamestring StudentName
StudentName = “Fred Bloggs” - 29a form has a text box called txtUserName write a section of code that copies the text property of the control to an appropriate variablestring UserName;
UserName = txtUserName.Text; - 30what is wrong with the following statementEnter text here...


- 31*write an if statment that reads data into a variable called UserName from an appropriate text box, the message “you are fred” should be displayedIF string Username =“Fred”
Print “you are fred” - 32what is wrong with the following validationEnter text here...


- 33what is wrong with the following loops?Enter text here...


- 34*write a loop that loops counting backwards from 10 to 0 adding results to list box called lstItemsint32 index =10
while (index >0)
{index -;}
Result = int32 lstItems - 35what would be suitable return data types for the following functions -StudentExist -GetFirstName -GetGroupNumbers -GetDateofFirstTransaction-SE Boolean
GFN String
GGN int32
GDOFT datetime - 36following function has been created void DeleteMembers() { } whats wrong with the following line of code Delete Member();DeleteMember();
- 37What parameters do with examplegives mechanism for copying data from one function to another
Success=MyAddressBook.Delete (AddressNo) - 38the following function needs a suitable parameter. modify the definition to include something appropriate void PrintDayReports () { }void PrintDayReports (string DayofWeek)
{ } - 39*write a function declaration that tells us the number of days in the current year including a parameter allows us to specify the yearvoid DaysInYear (date time year)
{} - 40*A function accepts a parameter to specify the year and returns the number of days for the year. write a section g code that assigns it to an appropriate variablevoid DaysInYear (date time year)
{}