A music album is a compilation of many songs recorded by one artist - NSC Information Technology - Question 3 - 2024 - Paper 1
Question 3
A music album is a compilation of many songs recorded by one artist. Music albums are evaluated after every 10 weeks to determine the number of points earned, based ... show full transcript
Worked Solution & Example Answer:A music album is a compilation of many songs recorded by one artist - NSC Information Technology - Question 3 - 2024 - Paper 1
Step 1
3.2.1 - Instantiate album object
96%
114 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
To instantiate the album object, extract the album title and artist name from the user interface:
var
albumTitle: string;
artistName: string;
begin
albumTitle := InputBox('Enter Album Title', 'Album Name:', '');
artistName := InputBox('Enter Artist Name', 'Artist Name:', '');
objAlbum := TAlbum.Create(albumTitle, artistName);
end;
Step 2
3.2.2 - Calculate points
99%
104 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
To calculate points, call the updatePoints method using three integer arguments: