class Integer that behaves similar to the built-in integer type…

Question Answered step-by-step class Integer that behaves similar to the built-in integer type… class Integer that behaves similar to the built-in integer type int, except that: 1) the meaningof addition and subtraction are reversed; and 2) the meaning of multiplication and division are reversed.The Integer class should satisfy the following requirements:i. A constructor should be provided that takes a single int argument that is used to initialize theInteger. The argument should default to zero.ii. The class should provide move and copy constructors, move and copy assignment operators, and adestructor.iii. The class should overload all of the following operators: addition, subtraction, multiplication, divi-sion, +=, -=, *=, and /=.iv. A stream inserter should be provided to allow an Integer to be written to an output stream (i.e.,std::ostream).v. A stream extractor should be provided to allow an Integer to be read from an input stream (i.e.,std::istream).vi. All data members should be private.histogram with three bins, corresponding to the intervals [0, 3.14), [3.14, 20), and[20, 42.42).Multicast Addressing and Routing provides a set of mechanisms for senders to transmit packets that are replicated by the routers so that they can be received by multiple systems. Explain how the basic mechanisms of IGMP, reverse path forwarding based on the underlying unicast routes, pruning and grafting, fit together to create  network service. [8 marks] (b) How might IP multicast be a risk for a network provider? [2 marks] (c) The Resource Reservation Protocol, RSVP, is a receiver oriented signalling protocol to establish state in routers for the purposes of classifying packets into flows and scheduling those flows onto routers. Explain what is meant by “receiver oriented”, and how this enables RSVP to be used by a multicast (many-to-many) application. [5 marks] (d) Why is TCP not going to work well with multicast? [3 marks] (e) What is philosophically odd about using TCP with RSVP? [2 marks]Consider a database with one binary relation B. (a) Write programs in stratified Datalog for the following queries: (i) Give the set of elements x for which there are fewer than three elements y such that B(x, y). [3 marks] (ii) Give the set of elements x such that there is no path (in the graph formed by B) from x back to itself. [3 marks] (iii) Give the set of elements x such that B(x, y) for every y. [3 marks] (b) Which of the queries defined in part (a) is: (i) safe? [3 marks] (ii) domain independent? [4 marks] (iii) monotone? [4 marks] In each case, justify your answer fully. 10 Types Let ? be a type variable and let ? subsets of polymorphic lambda calculus (PLC) types that are positive (ranged over by ? ) and negative (ranged over by ?) in ? are defined by the following grammar: ? ::= ??(? ) | ? | ? | ? ? ? ? ::= ??(?) | ? | ? ? ? (a) Give inductive definitions, following the structure of the grammar above, of closed PLC terms P? for each positive type ? , and N? for each negative type ?, such that ? ` P? : ??1, ?2((?1 ? ?2) ? (? [?1/?] ? ? [?2/?])) ? ` N? : ??1, ?2((?1 ? ?2) ? (?[?2/?] ? ?[?1/?])) [12 marks] (b) Now let ? be the type ??((? ? ?) ? ?), which is positive in ?. Calculate the beta-normal form of P? . [8 markThe context for this question is the search for a minimum spanning tree (MST) for a weighted connected graph. (a) Give a clear definition of the following MST technical expressions, describing also the type of X and Y : “X respects Y “, “z is a safe edge”. [3 marks] (b) For each of the following statements, say whether it is true or false and then support your argument with a correctness proof or a small counterexample as appropriate. [You should give a specific graph, preferably small, if you are offering a counterexample.] (i) In a graph where all edge weights are positive, if a subset of edges connects all vertices and has minimum total weight, then it is a tree. [2 marks] (ii) In a graph where edge weights may be positive or negative, if a subset of edges connects all vertices and has minimum total weight, then it is a tree. [5 marks] (iii) Let T be a minimum spanning tree, C be a cut and e be the lightest edge crossing the cut. Assume e /? T. Call f one of the edges of T that crosses the cut (one must exist because T spans all vertices). Then the set of edges T ? {e} {f} is also a tree. [10 marks] 2 CST.2013.3.3 2 Algorithms II (a) Draw a clear sequence of commented snapshots showing what happens when applying the following sequence of operations to the two-tree Fibonacci heap pictured below, where asterisks denote marked nodes. • insert key 5 • extract the minimum • decrease key 8 by 2 9 3 | 4 6* | 7* | 8 [You should draw one snapshot after each operation; and also, if it makes your explanation clearer, between 0 and 3 snapshots at key points during each operation.] [7 marks] (b) Explain how “cascading cuts” work. [2 marks] (c) Explain in clear detail why “cascading cuts” are necessary to achieve the Fibonacci heap’s performance. What methods would be slower without cascading cuts, and by how much? [5 marks] (d) “If, in a Fibonacci heap, we never call decreaseKey() or delete(), then at any time the degree (number of children) of any node is at most dlg ne, where n is the total number of nodes in the heap at that time.” True or false? Give a proof or a counterexample. [6 marks] 3 (TURN OVER) CST.2013.3.4 3 Programming in C and C++ (a) You have acquired a C program which declares an array v, populates it, and later writes it to a file in binary: #define NITEMS 100 struct Elem { signed long val; char flags; } v[NITEMS]; … fwrite(file, 1, sizeof(v), v); When run on a legacy processor (which no longer exists) this produces a file containing 500 bytes, but when re-compiled and executed on three modern desktops using various compilers it produces files containing respectively 800, 1200 and 1600 bytes. On all implementations char is an 8-bit value. (i) Explain what might be happening in the four versions in terms of compiler assumptions of alignment and size, in bits, of type long. Also give the values of sizeof(struct Elem). [3 marks] (ii) You now wish to read a file produced by the legacy processor into a version of the program running on your new desktop machine (one of the three above). Outline the changes, if any, you would need to make to the call to fread, mirroring the call to fwrite bove, so that the resulting v may be successfully processed by the rest of the program(a) Define the terms flat and hierarchical as applied to address spaces. [2 marks] (b) Give four examples of address spaces and state whether they are flat or hierarchical, and why. [4 marks] (c) Describe class-based addresses as used in the Internet. You need not worry about precise field sizes or class names. [4 marks] (d) Describe classless addresses as used in the Internet. [3 marks] (e) Why were they introduced? [2 marks] (f ) What information must be held in a routing table when classless addresses are used? [5. You may make any sensible assumptions about the legacy machine and your desktop machine provided you state them explicitly. Indicate how your program might be able to read both legacy- and new-format binary files. [10 marks] (b) (i) Write C++ class T which contains a const integer field n. T should also have constructor(s) which initialise n to an integer argument passed as a parameter or to zero if no argument is given; T should also have a destructor. The constructor(s) and destructor should print the value of the n field of the object being constructed or destructed. Indicate why, or why not, any of your fields or methods are qualified with virtual. [3 marks] (ii) Explain how objects of class T are allocated and deallocated, for each of the three areas: heap, stack and static store, noting one case where appropriate use of virtual is essential. What, if any, overlap in programmer convenience is there between stack-allocated objects with destructors and try-finally in Java? [4 marks] 4 CST.2013.3.5 4 Compiler Construction (a) Describe the costs and benefits of performing inline expansion of functions during compilation. [4 marks] (b) Describe what is meant by eliminating tail recursion, when such an optimization can be applied and why it is a benefit. [4 marks] (c) Consider the following ML-like program where the function f returns a function: let val a = 99 in let fun f b = let g c = a + b + c in g end let val f1 = f 17 in let val f2 = f 33 in let val v = (f1 a) + (f2 a) in … … Describe carefully how this program fragment could be compiled. Explain how the expression (f1 a) + (f2 a) would be evaluated by your compiled code. [12 marks] 5 (TURN OVER) CST.2013.3.6 5 Compiler Construction (a) When is it useful to eliminate left-recursion from a grammar and why? [2 marks] (b) Write recursive descent parser for the language generated by the following grammar. E ::= E + F | E – F | F F ::= NUM | ID | ( E ) [6 marks] (c) This section deals with how object-oriented classes are typically implemented by a compiler when only simple inheritance (each class has exactly one parent) is supported. (i) Describe in detail how objects are represented in memory and how this representation captures inheritance of attributes. [6 marks] (ii) Discuss how virtual methods can be implemented. [6 marks] 6 CST.2013.3.7 6 Concepts in Programming Languages (a) Give one difference and one similarity between the programming languages: (i) Algol and Pascal [2 marks] (ii) SIMULA and Smalltalk [2 marks] (b) Define the parameter-passing mechanisms: by value, by reference, by value/result, and by name. [4 marks] (c) What is the type of the expression fn f => fn g => fn x => f( g( f x ) ) given by the SML interpreter? Explain how this is inferred. [6 marks] (d) Give an example in the SML Modules language of a signature with an opaque type specification together with a structure that matches it. Explain your answer. [4 marks] (e) List two language innovations of the programming language Scala. Justify your answer. [2 marks] 7 (TURN OVER) CST.2013.3.8 7 Further Java A Java developer implements a class loader as follows: public class NetworkClassLoader extends ClassLoader { private String server; private int port; NetworkClassLoader(String server, int port) { … } @Override public Class findClass(String name) throws ClassNotFoundException { //TODO: download class file and place contents in byte array b. return defineClass(name, b, 0, b.length); } } (a) Describe what a Java class loader is, when it is used, and why a developer might need to implement their own class loader. [3 marks] (b) Write  Java program which accepts two arguments on the command line: a network port number and the full path to a Java class file in the file system. When executed, your program should wait indefinitely on the specified port for connections from clients. Whenever a client connects, your program should send the contents of the Java class file to the client. [8 marks] (c) Complete the method findClass by downloading the class file from the program you wrote in part (b). Any error states should generate a ClassNotFoundException. [8 marks] (d) Outline a security vulnerability which might arise when using your implementation of NetworkClassLoader from part (c) together with the server you wrote for part (b). [1 mark] 8 CST.2013.3.9 8 Prolog (a) The propositional logic formula A ? B can be represented by the Prolog term and(lit(A),lit(B)). Describe a scheme based on this example for representing an arbitrary propositional logic formula in Prolog. Demonstrate your scheme by encoding the formula ¬(¬P ? (Q ? ¬(R ? S))). [4 marks] (b) A formula is in Conjunctive Normal Form (CNF) if it is expressed as a conjunction (?-ing) of clauses, where each clause is a disjunction (?-ing) of literals. Write  Prolog program for converting a propositional logic formula into CNF by implementing the following procedure: (i) Push negations inwards until each applies only to a literal using De Morgan’s laws: ¬(A ? B) ‘ ¬A ? ¬B and ¬(A ? B) ‘ ¬A ? ¬B [5 marks] (ii) Remove double negations of literals: ¬¬A ‘ A [1 mark] (iii) Distribute one disjunction from the formula over a conjunction or fail if no such disjunction exists: A ? (B ? C) ‘ (A ? B) ? (A ? C) [6 marks] (iv) Repeatedly apply the distribution step until no more distribution can be done [4 marks] Ensure that your predicates behave appropriately with backtracking, avoid over-use of cut, and are commented appropriately. Minor syntactic errors will not be penalised. 9 (TURN OVER) CST.2013.3.10 9 Software Engineering Google have spent several years developing self-driving cars which rely on a range of sensors and stored data and are now claimed to have covered hundreds of thousands of miles with a good safety record. A Google executive has now asked to meet the Transport Secretary, who has in turn asked your company for advice. What sort of safety case should the government demand from vendors and service providers if autonomous vehicles are to be allowed on Britain’s roads? [20 maa) What is the difference between production test and functional test? [2 marks] (b) What is path sensitisation for production test? Provide an example. [4 marks] (c) Below is the circuit for a JTAG scan flip-flop. How are the signals TI, TO, TE and CLK used to undertake production test? [6 marks] (d) In SystemVerilog, what is the purpose of an “initial” block and how is timing specified? [4 marks] (e) What is static timing analysis and why is it important for a design to pass timing if it is to be functionally correct? [4 marks] 2 CST.2013.5.3 2 Computer Design The version of Thacker’s Tiny Computer 3 (TTC3) that was used in the 2012 ECAD Laboratory sessions (instruction set summary is below) has the following pipeline stages: fetch decode/register fetch execute/memory access write-back Currently the implementation only supports one instruction in the pipeline at a time, i.e. the next instruction is only fetched when the current one finishes in the write-back stage. If the implementation were to attempt to fetch a new instruction every clock cycle, explain the following microarchitectural issues: (a) What data hazards would exist and how can they be resolved whilst preserving the programmer’s sequential model? [5 marks] (b) What are control hazards and how can we avoid exposing them to the programmer? [5 marks] (c) When are branch target addresses computed on the TTC3 and how many bubbles will be introduced when taking a jump? Assume that such a tiny computer would not have a branch predictor. [5 marks] (d) On the TTC3, every instruction (except jump) can conditionally skip the next instruction. How might skip be implemented and how many pipeline bubbles need to be introduced? [5 marks] TTC3 Instruction Set Summary 31 2425 17 10 57 03 Rw Ra LC Rb Func Shift Skip Opcode Function: 0: A+B 1: A-B 2: B+1 3: B-1 4: A & B 5: A | B 6: A ^ B 7: reserved Shift (rotates right): 0: no shift 1: RCY 1 2: RCY 8 3: RCY16 Skip: 0: never 1: ALU<0 2: ALU=0 3: InRdy Opcode: 0: normal: Rw=F(Ra,Fb), skip if condition 1: storeDM: DM[Rb]=Ra, Rw=F(Ra,Rb), skip if condition 2: storeIM: IM[Rb]=Ra, Rw=F(Ra,Rb), skip if condition 3: out: OutStrobe, Rw=F(Ra,Rb), skip if condition 4: loadDM: Rw=DM[Rb], ALU=F(Ra,Rb), skip if condition 5: in: Rw=in_data, ALU=F(Ra,Rb), skip if condition 6: jump: Rw=PC+1, PC=F(Ra,Rb), no skip 7: reserved LC=load constant (bits 23:0 of the instruction), no skip PC=program counter ALU=Function(Ra,Rb), where the Function is specified by the Func bits F(Ra,Rb)=rotate(Shift, ALU), where the rotation is specified by the Shift bits 3 (TURN OVER) CST.2013.5.4 3 Computer Design (a) Moore's law is an observation by Gordon Moore in the 1960s that trends in electronic manufacturing technology would result in transistor density doubling every 18 to 24 months. (i) Explain how Moore's law can be applied to processor speed and hard disk density. [5 marks] (ii) Today transistor scaling favours transistors over wires and thermal densities limit performance. Why is this resulting in commercial chips having many processor cores rather than one high-performance processor core? [5 marks] (b) PCI, used to connect I/O boards to a PC, has been replaced with PCIe. This transition has resulted in parallel communication being replaced by bundles of serial communication channels. (i) What is the difference between parallel and serial communication? Why are multiple serial channels now preferred to a parallel link? [5 marks] (ii) Why might the latency of a single load of a register on a PCIe device take longer than on PCI? [5 marks] 4 CST.2013.5.5 4 Computer Networking (a) A spy elects to use a self-synchronizing scrambler to encode his secret message. Explain why this will not give him any privacy and why his self-synchronising approach would be better used by a communications engineer. [5 marks] (b) With the assistance of annotated diagrams explain CSMA/CD and CSMA/CA. In your explanation, note the physical constraints on packets and networks that these approaches impose. [10 marks] (c) Consider the network buffer sizing formula B = 2T × C (i) Explain this formula. [2 marks] (ii) Discuss the network architecture and traffic assumptions made in the use of this formula. [3 marks] 5 (TURN OVER) CST.2013.5.6 5 Computer Networking Here are four options for improving web page performance. Option 1: HTTP Caching with a Forward Proxy Option 2: CDN using DNS Option 3: CDN using anycast Option 4: CDN based on rewriting HTML URLs You have been asked to help reduce the costs for networking in the University. (a) The University pays its service provider networks'r'us, based on the bandwidth it uses; bandwidth use is dominated by students downloading external web pages. Which, if any, of the above four options would reduce the bandwidth usage? Explain your choice. [4 marks] (b) The delivery of online courses has become a tremendous success - but this has led to a significant increase in network costs for the University. You must select one of the options above to minimize load on the servers. Compare the operation of each option and justify a selection that provides the finest granularity of control over load to the content-servers and a selection that will serve each customer from the closest CDN server. [12 marks] (c) You have looked up the IP address of your favourite search engine on the University network and noticed the answer is different from that given to your friend when he did the lookup in Newfoundland, Canada. For each option above, indicate why it might, or might not, be used by your favourite search engine to improve web page performance. [4 marks] 6 CST.2013.5.7 6 Computer Networking (a) Considering either TCP/IP or UDP/IP, write  description of how server-port, client-port, source-port and destination-port relate to each other. You may wish to give examples and use diagrams as appropriate. [4 marks] (b) What is a routing-loop? Include a diagram in your answer. [4 marks] (c) Describe a mechanism that prevents routing-loops in Ethernet networks. [4 marks] (d) (i) Describe and, with the aid of an example, illustrate the IP Time-To-Live (TTL) mechanism for minimising the impact of routing-loops. [2 marks] (ii) Assuming, in part (d)(i), a perfect implementation, describe a disadvantage of the approach including the symptoms that might be experienced in a network subject to this disadvantage, and a test that may identify the problem. [2 marks] (e) Explain the technical and architectural argument behind the decision in IPv6 to retain header TTL but not a header checksum. [2 marks] (f ) Explain why there is ambiguity about handling packets with TTL values of 1 and give a practical solution. [2 marks] 7 (TURN OVER) CST.2013.5.8 7 Concurrent and Distributed Systems (a) Deadlock is a classic problem in concurrent systems. (i) What are the four necessary conditions for deadlock? [4 marks] (ii) Deadlock is often explained using the Dining Philosopher's Problem. In this pseudo-code, each fork is represented by a lock: Lock forks[] = new Lock[5]; // Code for each philosopher (i) while (true) { think(); lock(fork[i]); lock(fork[(i + 1) % 5]); eat(); unlock(fork[i]); unlock(fork[(i + 1) % 5]); } Partial ordering is a common deadlock prevention scheme. Describe modifications to the above code, changing only array indices, such that philosophers can be fed not only safely, but also deadlock-free, using a partial order. [4 marks] (b) Priority inversion can occur when threads of differing priorities synchronise on access to common resources - threads of greater priority may end up waiting on threads of lesser priority, leading to undesirable realtime properties. (i) Describe how this problem can be solved for mutexes using priority inheritance. [2 marks] (ii) Describe how priority inheritance would need to be modified to handle reader-writer locks. [2 marks] (iii) Priority inversion can also arise between two threads involved in process synchronisation - for example, when one thread uses a semaphore to signal completion of work. Why might implementing priority inversion be more difficult with process synchronisation than with mutual exclusion? [4 marks] (iv) What could we do to solve the problem in (b)(iii)? [4 marks] 8 CST.2013.5.9 8 Concurrent and Distributed Systems (a) The ACID properties are often used to define transactional semantics. (i) Define "atomicity" as used in the ACID context. [1 mark] (ii) Define "durability" as used in the ACID context. [1 mark] (b) Write-ahead logging is a commonly used scheme to accomplish transactional semantics when storing a database on a block storage device, such as a hard disk. (i) Under what circumstances, during write-ahead log recovery, can a transaction in the UNDO list be moved to the REDO list? [2 marks] (ii) Synchronously flushing commit records to disk is expensive. How can we safely reduce synchronous I/O operations on a high-throughput system without sacrificing ACID properties? [2 marks] (iii) Describe two performance changes that might arise from using your solution to part (b)(ii). [2 marks] (c) (i) Transaction records in a write-ahead logging scheme contain five fields: hTransactionID, ObjID, Operation, OldValue, NewValuei, but storing the complete old and new values can consume significant amounts of space. One strategy that might be employed, for reversible operations being applied to some data such as XOR by a constant, is to store only the constant arguments, rather than the full before and after data. What problems might occur as a result of this design choice? [4 marks] (ii) Write-ahead logging systems must know the actual on-disk sector size for the write-ahead log to behave correctly. An errant disk vendor decides to rebrand its 512-byte sector disks as 2K-sector disks, and adjusts the value reported back to the database system. How might this affect database integrity? [4 marks] (iii) Explain how a database vendor who is aware of the problem described in part (c)(ii) mitigate this problem in software, and what limitations might there be to this approach. [4 marks] 9 (TURN OVER) CST.2013.5.10 9 Concurrent and Distributed Systems Sun's Network File System (NFS) is the standard distributed file system used with UNIX, and has gone through a progression of versions (2, 3, 4) that have gradually improved performance and semantics. (a) Remote procedure call (RPC) (i) Explain how Sun RPC handle byte order (endianness). [2 marks] (ii) This approach may result in unnecessary work. State when this occurs and how might this be avoided. [2 marks] (b) Network File System version 2 (NFSv2) and version 3 (NFSv3) (i) A key design premise for NFS was that the server be "stateless" with respect to the client. State what this means for distributed file locking in NFSv2 and NFSv3. [2 marks] (ii) Another key design premise for NFSv2 was the "idempotence" of RPCs; what does this mean? [2 marks] (iii) One key improvement in NFSv3 was the addition of the READDIRPLUS RPC. Explain why did this helps performance. [4It is proposed to store a large number of records on a disk using Larsen's method so that any lookup can be done using only one disk transfer. All the records are of length 200 bytes and each contains a 20 byte key. The data is to be held on a single disk preformatted to contain 100,000,000 sectors each of size 4096 bytes. Reading multiple consecutive sectors is regarded as a single transfer. (a) Describe Larsen's algorithm in detail and, for the records and disk specified above, state the disk block size, the signature size and the amount of main memory that you would choose to use. [10 marks] (b) Carefully estimate the maximum number of records that could reasonably be stored on the disk assuming the sizes you gave in part (a). [6 marks] (c) Discuss the advantages and disadvantages of different signature sizes. [4 marks]It is possible to design a single instruction computer (SIC). For example, the instruction Subtract and Branch on Negative is sufficiently powerful. This instruction takes the form "A,B,C,D", meaning "Read A, Subtract B, Store in C, and Branch to D if negative". If a branch is not required, the address D can be set to the next instruction in the sequence so that the next instruction will be executed regardless of whether the branch is taken or not. An assembler short form for this branchless instruction is simply "A,B,C". (a) Write fully commented SIC assembler which implements the following pseudo code: a=1; b=1; for(i=1; i Most conventional hardware translates virtual addresses to physical addresses using multi-level page tables (MPTs): (i) Describe with the aid of a diagram how translation is performed when using MPTs. [3 marks] (ii) What problem(s) with MPTs do linear page tables attempt to overcome? How is this achieved? [3 marks] (iii) What problems(s) with MPTs do inverted page tables (IPTs) attempt to overcome? How is this achieved? [3 marks] (iv) What problems(s) with IPTs do hashed page tables attempt to overcome? How is this achieved? [3 marks] (b) Operating systems often cache part of the contents of the disk(s) in main memory to speed up access. Compare and contrast the way in which this is achieved in (i) 4.3 BSD Unix and (ii) Windows 2000.A multi-threaded application is using a long linked list of integers. The list is accessed through synchronized methods on a ListSet object. The list itself comprises a chain of ListNode objects in ascending numerical order. The chain always starts and ends with special sentinel nodes conceptually containing ?? and +? respectively. This simplifies the implementation of operations on the list: they do not have to deal with inserting elements at the very start or at the very end. (a) Sketch the definition of ListSet and ListNode as Java classes. You need only give appropriate field definitions and the implementation of an insert method on ListSet. [4 marks] (b) An engineer suggests that, instead of holding a lock on a ListSet object, threads only need to lock a pair of ListNode objects in the region that they are working. (i) Define methods lock and unlock for your ListNode class to allow a thread to acquire a mutual exclusion lock on a given node. [6 marks] (ii) Show how your insert method could be updated to incorporate the engineer's idea. [8 marks] (iii) Do you think the new implementation will be faster than the original one? Justify your answer. [2 marks]stores the(i) Describe with the aid of a diagram how translation is performed when using MPTs. [3 marks] (ii) What problem(s) with MPTs do linear page tables attempt to overcome? How is this achieved? [3 marks] (iii) What problems(s) with MPTs do inverted page tables (IPTs) attempt to overcome? How is this achieved? [3 marks] (iv) What problems(s) with IPTs do hashed page tables attempt to overcome? How is this achieved? [3 marks] (b) Operating systems often cache part of the contents of the disk(s) in main memory to speed up access. Compare and contrast the way in which this is achieved in (i) 4.3 BSD Unix and (ii) Windows 2000.current status of each housemate as a string of text. For example, housemate Evamight set her status to "Gone to the exam hall."Messages are passed between clients and the server as text strings sent over TCP.The new line character is used exclusively as the last character in every message. Onconnection with the server, a client can either (i) query the status of a user by sendingthe user's name to the server as a string (and the server responds with the currentstatus message), or (ii) set the status of a user by sending the user's name followedby a colon and the new status message. For example, "Eva:Gone to the exam hall."sets the statu(a) Implement a status server in Java. The server should run indefinitely, respondingto client requests. Once a client request has been fulfilled, the server should closethe connection. You may assume current status messages are lost if the serveris restarted and you do not need to handle exceptions. [8 marks](b) One housemate suggests the server and client should communicate by serialisingConsider the variations used within the production and rendering of a threedimensional model on a display screen.(a) List the three fundamental alterations inside the processing pipeline and provide an explanation fortheir rˆoles. [6 marks](b) Why is it convenient to represent the adjustments as matrices? [2 marks](c) What are homogeneous coordinates? Explain how they may be used in modellingthese variations as matrices.(d) Derive the matrix to represent a attitude transformation for a viewer at thefoundation of a point in 3 dimensions to some extent on a display within the aircraft z = d.(e) Perspective in classical artwork has vanishing points in the direction of which parallel tracesconverge. Explain mathematically why that is the case and show the way to calculatethe vicinity on the display of the vanishing point for strains in a selected route.[5 marks][Hint: It may be helpful to represent lines parametrically in vector form asP(s) = A + sV where V is a direction and A is any point on the line.]four Computer Graphics and Image ProcessingConsider a curve described through polynomial parametric segments Pi(s) for i = 1, 2, . . . Mthat interpolates a fixed of factors Ai0?i?m in 3 dimensions.(a) What is supposed by way of Ck continuity at the junction of two segments? [3 marks](b) What is the least order of the polynomials that must be used to obtain Ckcontinuity on the junctions? [2 marks](c) Derive the Overhauser formulation for a set of weighting features w?2(s),w?1(s), w0(s) and w1(s) in order that the cubic curve section joining Ai?1 and Aimay be expressed as Pi(s) = w?2(s)Ai?2 + w?1(s)Ai?1 + w0(s)Ai + w1(s)Ai+1for 1 < i < m. [10 marks](d) Extend this formulation to present a fixed of parametric patches Pi,j (s, t) for 1