You have been asked to work as a usability consultant, for a company where the development team
Question:
You have been asked to work as a usability consultant, for a company where the development team has created a new version of an existing product. Two important requirements were that the new user interface should be both efficient and intuitive. (a) How would you interpret each of these requirements, in the light of your knowledge of HCI? [1 mark each] (b) The development team claim that their new user interface is already more efficient than the old one. Explain in detail how you could measure whether this claim is justified. (c) The developers also claim that their new version is already more intuitive than the old one. Explain in detail how you could measure whether this claim is justified. (d) What technique could you have used to predict each of these measured improvements, if you had been consulted earlier in the design cycle?
You have identified a market opportunity for home media players that would cater for older members of the population. Many older people have difficulty understanding the operating principles of devices such as MP3 players, "internet radios" for streaming audio, and personal video recorders and players. Describe design and evaluation processes that could be used by a start-up company to improve the usability of such devices for this population. You should consider several different stages of the product design cycle, and describe five different user interface design techniques that would be relevant at those different stages.
Describe the facilities in Java for restricting concurrent access to critical regions. Explain how shared data can be protected through the use of objects. The built-in facilities for restricting concurrency in Java allow only one thread at a time to be executing within the critical region. it is complete A different approach is to distinguish shared and exclusive access to a critical region: any number of readers may share access at the same time, but only one writer may acquire exclusive access. Specify a MultiSync class in Java with methods to acquire and release both read and write access, and sketch its implementation. Derive a MultiBuffer class that extends MultiSync with methods to store and read a data field, ensuring that any locks are released when a waiting thread is interrupted. Your example may use a simple data field such as an integer but you should explain why such an elaborate scheme of concurrency control is unnecessary in this case.
Although each of these techniques can provide new information of value to a software project, costs can be reduced if information is available earlier in the design cycle. For each of the four techniques in part (a), suggest a method by which some of the resulting information could be obtained earlier in the project.
(a) A combinational logic circuit takes a 4-bit unsigned binary integer number at its inputs labelled D3 , D2 , D1 and D0 , where D3 is the most significant bit. For decimal input 1, 2, 3, 5, 7, 11 and 13, the output S is to be at logic 1, and it is to be at logic 0 otherwise. (i) Write down the truth table for the required combinational logic function. (ii) Using a Karnaugh map, determine the simplified Boolean expression for the output S in terms of the inputs D3 to D0 in a minimum sum-of-products form. (iii) Describe what is meant by an essential term in a Karnaugh map. Write down the essential terms for the Karnaugh map in (ii). (iv) Using a Karnaugh map, this time determine the required simplified Boolean expression for the output S in a minimum product-of-sums form. [10 marks] (b) Provide a circuit diagram which implements the following Boolean function using only NAND gates F = (A + D).(B + C + D).(A + B + C) that has the don't care states: A.B.C.D, A.B.C.D, A.B.C.D and A.B.C.D [4 marks] (c) Show that (X + Y ).(X + Z) = X + Y.Z (X + Y ).(X + Z) = X.Z + X.Y Using these results or otherwise, simplify the following expression
Give the formula for a Bezier cubic curve. Derive the conditions necessary for two Bezier cubic curves to join with (a) just C0-continuity and (b) C1-continuity. Give a geometric interpretation of each condition in terms of the locations of control points. Explain (mathematically) why a Bezier cubic curve is guaranteed to lie within the convex hull of its control points. [8 marks] Basic ray tracing uses a single sample per pixel. Describe four distinct reasons why one might use multiple samples per pixel. Explain the effect that each is trying to achieve, and outline the mechanism by which it achieves the effect. [8 marks] Describe the differences in the computational complexity of the depth sort and binary space partition (BSP) tree algorithms for polygon scan conversion. If you were forced to choose between the two algorithms for a particular application, what factors would be important in your choice?
One goal of a multiuser operating system is to protect each user's information and activity from damage caused by accidental or deliberate actions of other users of the system. (a) Describe a mechanism that operating systems use to reduce the opportunity for a user process to prevent another user's process from making progress. In your description include any particular hardware features that are relied upon. [3 marks] (b) Describe two alternative mechanisms that operating systems could use to reduce the opportunity for a user process to access or corrupt the information being used by another user's process. In your descriptions include any particular hardware features that are relied upon. [6 marks] (c) Describe how an operating system might attempt to ensure that long-term user information (that is, information which exists beyond process execution) is not interfered with or misused by other users. Your description should be clear about when actions are performed and the resources they consume. [5 marks] (d) To what extent are the mechanisms described above useful in single user systems? [3 marks] (e) How do operating systems ensure that they are not themselves overly-restricted by these mechanisms?
It is commonly suggested that Algol-60 call-by-name can be modelled by passing a function as a call-by-value parameter. Show how a program containing a definition int f(int x:name) { ... x ... x ... } of f (where x occurs only in Rvalue context) and a call f(e) to f can be replaced by an equivalent definition and call using only call-by-value. [6 marks] Most such explanations assume that the uses of x within f occur only in Rvalue context. However, Algol-60 also permits the equivalent of int g(int x:name) { if (p) { ... x := x+1; x := -x; ... } return x; } and calls like g(a[k()]) which, when p is true, would have the effect of calling k() five times and consequent access to five (possibly different) subscripts of array a[]. Develop your explanation for the first part of this question to cover also the case of a call-by-name parameter being used in both Lvalue and Rvalue contexts. [Hint: note that when p is false then the actual parameter to g need not be an Lvalue, so you may need two parameterless procedure arguments ("thunks").] [8 marks] Using the previous part or otherwise, give a translation of a definition and call h(e) using call-by-value-result (Ada in out mode) with no uses of the address-of (&) operator other than those involved in call-by-name. Your explanation is allowed to deviate from call-by-value-result by allowing side-effects in e to take place twice. [6 marks] 5 Data Structures and Algorithms Outline the mechanism used in the Burrows-Wheeler block compression algorithm, illustrating your description by applying it to the string ALFALFA. [14 marks] Briefly discuss the advantages and disadvantages of the Burrows-Wheeler algorithm compared with other commonly used compression methods.
(a) Let m be a fixed positive integer. (i) For an integer c, let Kc = { k N | k c (mod m) }. Show that, for all c Z, the set Kc is non-empty. [2 marks] (ii) For an integer c, let c be the least element of Kc. Prove that for all a, b Z, a b (mod m) iff a = b. [4 marks] (b) (i) State Fermat's Little Theorem. [2 marks] (ii) Prove that for all natural numbers m and n, and for all prime numbers p, if m n
mod (p 1) then k N. km k n (mod p). [6 marks] (c) (i) Use Euclid's Algorithm to express the number 1 as an integer linear combination of the numbers 34 and 21. [3 marks] (ii) Find a solution x N to 34 x 3 (mod 21)
(a) For each symbol x in the alphabet = {a, b, c}, let Ox be the language over consisting of all strings that contain an odd number of occurrences of the symbol x; and let Ex be the language of strings over containing an even number of occurrences of the symbol x. (i) Give a deterministic finite automaton whose language of accepted strings is Oa. [2 marks] (ii) Give a regular expression whose language of matching strings is Oa. [2 marks] (iii) Give a deterministic finite automaton whose language of accepted strings is Oa Eb. [4 marks] (b) M = (Q, , , s, F) is a deterministic finite automaton whose set of states Q has ` elements. Suppose that M accepts a string w whose length |w| satisfies |w| `. (i) Show that w = u1vu2 for some strings u1, v, u2 such that |u1| < `, 1 |v| ` and M accepts u1v nu2 for all n N = {0, 1, 2, . . .}. [7 marks] (ii) Hence show that if infinitely many strings are accepted by M, then it must accept some string w 0 with ` |w 0 | < 2`.
Write java program to implement Bubble sort, Quick Sort, Merge Sort .Write java program to implement Binary Search(Recursive) : Write java program to implement Binary Search Tree(traversal)
: Write program that reads digits and composes them into integers.
A modern processor's memory is constructed from a hierarchy of memories. Explain what the levels of the hierarchy are. [5 marks] Why do modern processors have several registers rather than an accumulator plus one or two index registers? [5 marks] Hand compile the following pseudo-code for both a register machine and an accumulator machine of your choice. You may invent an instruction set. Make the semantics of the code clear via comments. a=0; b=1; for(i=0; i<5; i++) { a=a+b; b=a-b; } [10 marks] 7 Operating System Functions The following are three ways which a file system may use to determine which disk blocks make up a given file. (a) chaining in a map (b) tables of pointers (c) extent lists Briefly describe how each scheme works. [3 marks each] Describe the benefits and drawbacks of using scheme (c). [6 marks] You are part of a team designing a distributed filing system which replicates files for performance and fault-tolerance reasons. It is required that rights to a given file can be revoked within T milliseconds (T > 0). Describe how you would achieve this, commenting on how the value of T would influence your decision.
(a) Describe the difference between blocking and nonblocking input/output operations. How can an operating system improve the performance (as seen by a process) of blocking operations? [4 marks] (b) A privileged process is given raw access to a slow disk device. It reads a from the disk (using a blocking operation), processes the information and repeats. Suppose a read takes 3 units of time and the processing 2 units of time, so that reading a block and processing takes 5 units of elapsed time. Assuming the machine is otherwise idle, how can this elasped time be reduced? State any assumptions about hardware features you are making. [5 marks] (c) Describe how polled I/O works and state its disadvantages. Under what conditions is polling a sensible approach? Describe an alternative approach. (You may find it helpful to provide a few lines of psuedo code.) [4 marks] (d) What advantages does direct memory access (DMA) provide? Describe its operation as seen by a device driver in the operating system. (e) To what extent does heterogeneity in I/O systems add complexity to an operating system?
Introduction Extend the inheritance hierarchy from the previous project by changing the classes to template classes. Do not worry about rounding in classes that are instantiated as integer classes, you may just use the default rounding. You will add an additional data member, method, and bank account type that inherits SavingsAc-count ("'CD", or certicate of deposit). Deliverables A driver program (driver.cpp) An implementation of Account class (account.h) An implementation of SavingsAccount (savingsaccount.h) An implementation of CheckingAccount (checkingaccount.h) An implementation of CDAccount (cdaccount.h) Account class Change to a template class and add/modify the following items. 1.1 Data Members accountNumber (string) 1.2 Member Functions Constructors Add accountNumber to the constructor. Accessors string getAccOuntNumber( Returns the account number, 2 SavingsAccount class Change toa template class. Add accountNumber to the constructor. You may make interestRate protected so you can directly access it in CDAccount. No other modi cations 3 CheckingAccount class Change to a template class. Add accountNumber to the constructor. No other modi cations. 4 CDAccount class Implement a template class that is derived from SavingsAccount class. 4.1 Data Members No additional data members (inherits its data members). Constructors De nes a parameterized constructor which calls the SavingsAccount constructor. Destructor De nes destructor. If you have allocated memory, clean it up. Mutators void debit(amount) Rede nes the member function to debit nothing from the balance and retun false, since you are not allowed to debit from a CD during its term. void credit(amount) Invokes the base class credit member function to add to the account. checkingAccounts). The rst has Account pointers with type double that point to a CD and a Savings account, the second has Account pointers with integer type and point to two Checking accounts. Initialize the objects with the users input and appropriate constructors. Next, create a loop that, for each savingsAccount, allows the user to deposit and withdraw from the account using the base class member functions. After withdrawing and depositing, downcast to a SavingsAccount pointer and add interest. Print the updated information by invoking the base class member function dis playAccount). Create another loop for each checkingAccount that allows the user to deposit and withdraw from the account using the base class member functions. After withdrawing and depositing, print the updated information by invoking the base class member function displayAccounto. Verify that, even if doubles are passed to the constructor, their values are coerced to integers. .| CXdnmple input. CD Account Please enter the account number 98765432 Please enter the balance: 70 Please enter the interest rate: 0.1 (repeat for the savings account) Checking Account 1 Please enter the account number: 01010101 Please enter the balance: 70.55 Please enter the fee: 1.99 (repeat for next checking account) 5.2 Example output: CD Account 1 balance: $70.00 Enter an amount to withdraw from Account 1: 10.00 Cannot debit from a CD account. Enter an amount to deposit into Account 1: 35.00 Adding $10.50 interest to Account 1 CD account 01234567 has an interest rate of 0.10 and a balance of $115.50 Checking Account 1 balance: $70 Enter an amount to withdraw from Account 1: 9.99 0 $1 transaction fee charged Enter an amount to deposit into Account 1:.99 1 transaction fee charged.