Question: Q5: Instruction 1 - Note: Once the Dataframes are loaded please convert into temporary views so you can access directly using SQL, the view names
Q5: Instruction 1 - Note: Once the Dataframes are loaded please convert into temporary views so you can access directly using SQL, the view names should be "Salesview" and "Empview" respectively. Additional Details for the question - Consider the use of a monad for input-output. For the purposes of this question, take the IO monad as including two operations readint and writeint which respectively read integers from stdin and write integers to stdout. Give the types of these operators. [2 marks] (c) Assume MLreadint and MLwriteint are primitives with side effects for inputoutput and consider the ML expression add1 of type int: let val x = MLreadint() in MLwriteint(x+1); x end (i) Give an equivalent expression which uses the IO monad instead of side-effects, and state its type. [3 marks] (ii) Give a function run2diff which can be applied to your answer to part (c)(i). Use 10009 for your itemsEaten dynamic array size (make sure to use a constant for this). Use 10-80 as your random range for age when creating Goats that the farmer introduces into the trip (use constants). Use age 40 when creating Goats by twin birth. The solution to online coursework. Policy: The coursework setter has read and access. A candidate has no access until after the marks have been published. [8 marks each] 4 CST.2004.13.5 5 Computer Graphics and Image Processing (a) Explain why display devices appear to be able to reproduce (almost) all the colours of the spectrum using only red, green and blue light. [4 marks] (b) Describe an algorithm (other than thresholding) which will convert a greyscale image (8 bits per pixel) to a bi-level black and white image (1 bit per pixel), with the same number of pixels, while retaining as much detail as possible. [8 marks] (c) Explain what specular and diffuse reflection are in the real world. State and explain equations for calculating approximations to both in a computer. [8 marks] 5 [TURN OVER CST.2006.14.6 6 Compiler Construction (a) Explain the differences (illustrating each with a small program) between (i) static and dynamic binding (scoping); Start with 31 goats in your trip (use a constant for this). Have yourloop conduct at least 4 goatdates (use a constant for this). Use lots of constants.When so applied it should give a value in the IO monad which corresponds to ML code that runs add1 twice and returns the difference between the values read. [4 marks] (d) State what happens when attempting to compile and execute the following Java fragment (explaining the origin of any error messages or exceptions which might arise). Object n = new Integer(42), o = new String("Whoops"); Object [] x; Integer [] V = pos([H|T],[H|T]) :- H >= 0, pos(T,R). pos([H|H],S) :- H < 0, pos(T,R). 8 CST.2016.3.9 8 Software Engineering Discuss the contribution and the relative value of the following aspects of the modern development environment. Illustrate with examples from your group project, or from experience you gained working for a commercial software developer, or both. In each case, would you discard this feature if your employer let you, or insist on retaining it (even covertly) should your employer not value it? Explain your reasons. (a) Dividing a project into short development episodes or sprints. (b) Project progress visualisation tools such as PERT and GANTT charts. (c) Automated regression testing tools. (d) Source code management tools.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
