Question 14)http://ibdocuments.com/IB%20PAST%20PAPERS%20-%20SUBJECT/Group%204%20-%20The%20sciences/Computer_science_SL/2007%20November%20Examination%20Session/English%20Papers/Computer_science_paper_1_SL.pdf

a) With the word access modifier "private" we are declaring that the method will only be accessible within that class (i.e you can not call the method from an external class/file). b) Since the value of the parameter "month" is 7, the first two "if/else" statements will be skipped and the value returned will be 31c)We could have logical error if we are trying to assign the value returned so a variable of a different type (i.e not int) or if we are not respecting the number and the type of the parameter. d)It can be used in methods such as calculating the date after a certain number of days/weeks/months/years.

RP
Answered by Raul P. Computing tutor

1764 Views

See similar Computing IB tutors

Related Computing IB answers

All answers ▸

What is encapsulation?


The program I've written doesn't do what its supposed to! I don't have any errors, so I don't even know where to start looking for the problem. Where can I begin?


How do you convert a number between decimal and binary?


What are adventages and disadventages of encryption network security?


We're here to help

contact us iconContact ustelephone icon+44 (0) 203 773 6020
Facebook logoInstagram logoLinkedIn logo

© MyTutorWeb Ltd 2013–2025

Terms & Conditions|Privacy Policy
Cookie Preferences