donut Class invariants Donut name must not be empty (Default: Classic Type of donut can only be one of the following: Plain, Filled, or Glazed
donut Class invariants Donut name must not be empty (Default: "Classic" Type of donut can only be one of the following: "Plain," "Filled," or "Glazed" (Default: "Plain Class Components Publie Getter and Privote Setter for name, type, and price - enforce invariants A constructor that takes in as argument the name and type of the donut (enforce invariants) O Determine the price of the donut based on the type: S0.99 for plain $1.29 for glazed $149 for filled A toString) method that returns the name, type, and price of the donut. An equols| method that returns true if it's the same name and type (regardless of price). Class Design: DonutBox (Suggested Time Spent: < 15 minutes) The Donut Box class is intended to be an abstract and simplified representation of a box of donuts. Among other things, this object should be able to list the price of the donuts. Class Properties (MUST be private) Donuts (Donut[|)- an array of donuts Count-number of donuts in the box
For a processor pipeline, what is the difference between control and data dependencies? [4 marks] (b) For a superscalar processor, under what conditions can instructions from the same thread be executed in parallel? [4 marks] (c) What does it mean to have coherent shared memory and in this context what do the terms write propagation and write serialisation mean? [8 marks] (d) If a simultaneous multithreading processor core supports two hardware threads (or Hyperthreads), under what conditions might performance be decreased by scheduling two jobs in parallel rather than running them sequentially? [4 marks] 3 Computer Design (a) Why do modern processors need caches and what statistical properties do they exploit to improve processor performance? [5 marks] (b) How are cache tags used in direct-mapped and fully-associative caches? [5 marks] (c) A translation look-aside buffer (TLB) is a form of cache, but what does it store and how are TLB misses handled? [5 marks] (d) A processor architect proposes the use of a large direct-mapped TLB rather than the traditional small fully-associative TLB. What might the performance implications be? [5 marks] 4 Computer Networking The popular press suggest that the Internet is a great success. Based on the range of topics covered in the Computer Networking course, critique the technological success and failure of the Internet. Assertions alone will not constitute an answer to the question: please supply evidence by examples.
(a) Describe the aspects of a fair market. [4 marks] (b) Describe the settlement mechanism in a credit card transaction. [4 marks] (c) Describe the functions of a currency and the challenges of implementing electronic currencies. [4 marks] (d) Discuss whether Bitcoin is better described as a currency, a bearer certificate or something else and what tests you would apply in making this determination.
A leisure park has decided to adopt a variety of mobile and sensing technologies to monitor the usage of its attractions. An app is offered to customers willing to install it on their smartphone, which tracks customers' location throughout the park and uses the phone accelerometer to monitor activity. (a) Describe how app developers could make sure the app delivers the best accuracy on location and activity tracking while preserving the phone battery as much as possible through system and sensor sampling optimizations. [6 marks] (b) A customer installs the app on their device. They have two other applications on the phone which monitor their physical activity as well as their location throughout the day for clinical reasons. Describe how the phone operating system could optimize the battery efficiency of the sensing across applications. [5 marks] (c) A variety of wireless sensors are scattered throughout the park to monitor the operation of the attractions by continuously gathering temporal data (e.g., mechanical vibration, load, temperature, humidity). (i) Describe a combination of medium access and network layer protocols for infrastructure-less multi-hop networks to aid the sensor data delivery to the park management servers. Discuss advantages and disadvantages of the solution devised. [5 marks] (ii) Describe a solution which uses protocols from the Internet of Things domain to offer a non multi-hop solution. Discuss the advantages and disadvantages of the solution devised. [4 marks] 10 CST2.2018.8.11 10 Principles of Communications (a) There are two main ways in which traffic sources can be controlled: open-loop and closed-loop. Describe the overall operation and use of these two kinds of network system: What are the key components of an open-loop controlled protocol? What are the key components of a closed-loop, or feedback controlled system? What kinds of applications are suited to each class of control loop? [10 marks] (b) Two important approaches to fairness are max-min, and proportional. Describe what properties each of these offer, how they differ in how they can be used, and what happens in each case when demand exceeds supply of network capacity. [10 marks] 11 (TURN OVER) CST2.2018.8.12 11 Quantum Computing (a) In the quantum teleportation protocol, Alice and Bob are each in possession of one qubit of a pair in the joint state 1 2 (|00i + |11i). In addition, Alice has a qubit in an arbitrary state |i. Explain how the protocol works. In particular, show that it involves the transmission of exactly two classical bits of information from Alice to Bob and demonstrate how, at the end of the protocol, Bob is in possession of a qubit in state |i. [10 marks] (b) Suppose now that Alice has two qubits in a state |i = 0|00i + 1|01i + 2|10i + 3|11i. In addition, there is a pair of qubits in the state 1 2 (|00i + |11i) such that Alice is in possession of one qubit of the pair while Bob is in possession of the other. Alice now uses the quantum teleportation protocol to transmit to Bob the first qubit of |i. What is the resulting joint state of the two-qubit system composed of the second of Alice's qubits and the qubit in Bob's possession? [10 marks] 12 CST2.2018.8.13 12 Security II (a) Name three different families of algebraic groups that are commonly used in cryptographic applications of the Diffie-Hellman problem, where any group element (other than the neutral element) can be used as a generator. Briefly outline some of their main attributes, such as the set of elements and the group
Step by Step Solution
There are 3 Steps involved in it
Step: 1
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started