This set of challenges is designed to be completed with a logic board such as the Logic & Arithmetic board designed by the University of Southampton and the UK Electronic Skills Foundation. Alternatively, if you do not have access to…
Question 1[2 marks] Class File: private filename //Constructor for the File class procedure new(strFilename): filename = strFilename public procedure rename(strFilename) if strfilename!="": filename = strFilename Class MP3 inherits File: private title private artist private duration //Constructor for the MP3 class…
Question 1[2 marks] class Padlock: private key private locked //Constructor for the Padlock class: procedure new(str_key,bool_locked): key = str_key locked = bool_locked public function unlock(combination): if combination==key: locked = False return True else: return False public procedure lock(): locked =…