Question 4

OCR Computer Science June 2016 Paper 1AS17 marks

On the specification

(a)
1.2 Software and software development
(b)
1.3 Exchanging data
(c)
2.2 Problem solving and programming
(d)
1.2 Software and software development
Question text

4 A programmer spends her spare time contributing to an open source application that converts video files from a range of formats to one which uses lossy compression. (a) Describe what is meant by the term ‘open source software’. [2] (b) Describe what is meant by the term ‘lossy compression’. [2] When a video is selected, the program gives an estimate of the file size of the converted video. The estimate in kilobytes is calculated by multiplying: • the number of pixels in the video’s resolution by… • the number of frames per second by… • the length of the video in minutes by… • the value 0.0013. (c) Write a function in pseudocode that estimates the size of a converted video. It should: • take in 3 parameters: pixels, framesPerSec, lengthMins • calculate the estimated file size • return a string with the file size, including units • use megabytes for sizes under 1000 megabytes, otherwise the estimate should be given in gigabytes. Examples: • 480000 pixels at 24 frames per second for 60 minutes will return a size of 898.56 MB • 480000 pixels at 24 frames per second for 120 minutes will return a size of 1.797 GB. [4] The coding team are looking at writing a new closed source version of the application that converts audio and image files in addition to video. They intend to sell copies of the program when it is complete. They investigate three programming languages they could use, including: • C++, which is compiled to machine code • Java, which compiles to an intermediate code that then runs off a virtual machine • JavaScript, which runs from an interpreter in a web browser. (d)* Discuss the benefits and drawbacks of the three options above and justify which option you would recommend. [9]