Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

123 Compare the purely graphical properties of these two notations, and the ways in which the graphical properties of each display correspond to the information

123 Compare the purely graphical properties of these two notations, and the ways in which the graphical properties of each display correspond to the information structure being defined. Describe three ways in which the graphical correspondences are different. [2 marks each] (b) What analytic approach could be used to compare the usability implications that arise from considerations such as those in part (a)? [1 mark] (c) On the basis of the approach in part (b), suggest three specific usability issues relevant to the design of programming environments, in each case contrasting the implications for programming in UML and Java. [3 marks each] (d) Describe an empirical approach that could be used to evaluate the usability of a new environment, with respect to one or more of the issues identified in part (c). Consider both the collection and analysis of data. [4 marks] 6 CST.2011.7.7 8 Mobile and Sensor Systems Consider a vehicular network where cars are equipped with a Wi-Fi radio (802.11) interface. Assume a number of Wi-Fi basestations scattered around an area. The basestations provide only very sparse coverage of the area, but are connected to the Internet through a backbone network. (a) Explain what effects the mobility of the vehicles can have on communication. In particular, describe short- and long-term fading effects. [3 marks] (b) Illustrate the essential aspects of the MAC layer of 802.11. [3 marks] (c) Consider RTS and CTS packets used in 802.11. Describe what problem they solve and indicate where this approach is incomplete] (d) Assume that information about traffic needs to be disseminated from the basestations to all vehicles. Explain what routing protocol(s) would be suitable for a vehicular scenario like the one described (do not consider GPSR): justify your selection and the trade-offs of your choices. [6 marks] (e) Now assume that vehicles collect traffic information (such as their speed and position) and want to forward this information to a server. Also assume that nodes adopt GPSR to route messages geographically to the closest basestation (position known). Explain how GPSR can be used for this purpose and under what conditions it would not work.

(a) A key/value store holds pairs of strings in a non-volatile memory (NVM). The NVM is mapped as a memory region between two hardcoded virtual addresses, NV START and NV END. This memory is all set to zero as manufactured and can be freely read, but any write operations result in a logical ORing of the new data with the old data at the addressed location. Bits can never be cleared. Strings representing keys and values will be fewer than 250 characters long. Eventually the memory will fill up, but sufficient is available for the intended application. The API provides the following two operations: int store(char *key, char *value) // returns non-zero on error, and char *lookup(char *key) // returns NULL if not found. Provide a full C implementation of the store routine, explaining how the lookup function and changes to values under a given key would work, if this is not obvious from your code. Code efficiency is not important. Hint: You can directly access the non-volatile store using a construct such as ((char *)NV_START)[offset]. [10 marks] (b) The following text almost constitutes both a C++ and Java program: class Foo { public: int x, y; }; class Test { private: void f1(Foo p) { p.x = 1; } private: void f2(Foo &q) { q.y = 2; } //[Java]: ignore '&' public: void test() { Foo p; //[Java]: replace with: 'Foo p = new Foo();' p.x = p.y = 99; f1(p); Foo q = p; p = q; f2(q); print("HERE"); } }; (i) Explain the storage structure accessible from variables x and y when control reaches print("HERE") following a call to test(), both in the Java and the C++ interpretations. [3 marks] (ii) For the C++ interpretation, show how adjustments only to the definition of class Foo can cause (useful) debugging-style output to be produced at as many places as possible during the execution of method test(). [7 mark

(a) ButtonCanvas could be built using multiple inheritance. What does this mean in this context? [2 marks] (b) Give two reasons why this might be desirable. [2 marks] (c) Give two complexities that arise in this case. [2 marks] (d) Java interfaces originally contained only abstract methods and static final fields. How did this restriction avoid the complexities of extending multiple classes? [3 marks] (e) Draw a UML diagram for building ButtonCanvas using abstract interfaces rather than multiple inheritance. Explain how your design attempts to preserve the desirable properties arising from multiple inheritance. You do not need to recall the exact UML specification, instead you may provide a key explaining your notation. [9 marks] (f ) Recent versions of Java added default methods to interfaces. What is the impact of this with respect to multiple inheritanc

(a) Describe the differences between primitive types and objects in Java. Consider: (i) the values they contain [1 mark] (ii) where they are stored in memory [1 mark] (iii) how they interact with Java references [1 mark] (b) What are auto-boxing and auto-unboxing? Give an example of how they might cause an exception to be thrown. [4 marks] (c) Consider the following code in which any arbitrary Java type (primitive or object) could be substituted for T. void f(T t) { /* ... */ } T t1 = /* ... */ f(t1); For which substitutions of T can we guarantee that the value in t1 is unchanged after the invocation of f(t1)? Justify your answer. [3 marks] (d) Explain how Java's implementation of generics precludes substituting T with a primitive type. [2 marks] (e) You are asked to redesign the standard library to incorporate an immutable list. Explain the relative merits of: (i) MutableList being a subtype of ImmutableList [2 marks] (ii) ImmutableList being a subtype of MutableList [2 marks] (iii) ImmutableList and MutableList having no common supertype [2 marks] (iv) ImmutableList and MutableList both subtyping CommonList [2 marks]

(a) You are given the following implementation for an element of a list: class Element { int item; Element next; Element(int item, Element next) { super(); this.item = item; this.next = next; } @Override public String toString() { return item + " " + (next == null ? "" : next); } } (i) What does the statement super() mean? [1 mark] (ii) What is the meaning of this in the line this.item = item? [1 mark] (iii) What is the purpose of the annotation @Override? [2 marks] (iv) Rewrite the class to be immutable. You may assume that there are no sub-classes of Element. [2 marks] (b) Use the immutable Element class to provide an implementation of an immutable class FuncList which behaves like an int list in ML. Your class should include a constructor for an empty list and methods head, tail and cons based on the following functions in ML. Ensure that your class behaves appropriately when the list is empty. [6 marks] fun head x::_ = x; fun cons (x,xs) = x::xs; fun tail _::xs = xs; (c) Another developer changes your implementation to a generic class FuncList that can hold values of any type T. (i) This means that FuncList is no longer immutable. Explain why and what could be done to remedy this. [2 marks] (ii) Java prohibits covariance of generic types. Is this restriction necessary in this case? Explain why with an example

I need your help with my questions below. I am a beginner at Java programming, so I don't know how I can do the following steps and add them to my code: http://sendanywhe.re/P7BV706M. I am stuck on them.

So I need your help with the following questions below.

If you can give detail feedback on each of my questions and help me solve them.

It will be really appreciable.

Required:

Newest IntelliJ IDEA Community Edition with default settings

Question Number 1: How do I design this part below in GitHub and IntelliJ?

Update the @authors fields in Main.java to have full names; Build project and check that math game works correctly; Select whole project, then use VCS / Commit... to commit changes into the local GIT repository. This will bring up a dialog box that allows to select which changes want to add into GIT index and then commit into GIT repository. Make sure Main.java file is ticked, so it will be added; Enter a useful Commit message Click the Commit button (just a simple Commit at this stage, not Commit and Push...). If IntelliJ reports errors in code, should cancel the commit and fix them. If it reports warnings, can review them and fix some if like, but then go ahead with the Commit; Now go to GitHub repository in browser and refresh the page to see if that Commit has been copied up to GitHub? should find that it has NOT been pushed up to GitHub yet - commit has been added to local GIT repository (in the .git folder inside project), but has not been pushed yet; Use IntelliJ menu: VCS / Git / Push... to push all the recent commits up to the GitHub servers; Refresh the browser again and should now see commit changes appear on GitHub.

Question Number 2: How do I implement this part in Intellij?

The Java code inside the main() method is getting too long. It is time to start breaking up that code into objects, and use object-oriented programming.

So in this section, Will be adding Question objects to the program, and then changing the main method (in Main.java) so that it cooperates with those Question objects and gets them to do most of the work of the game.

This will make our main method smaller and easier to understand. It also opens up more possibilities for reuse of our code and objects:

Could reuse these Question objects in other quiz programs in the future; or Could reuse them together with a different kind of Main program such as a Graphical User Interface (GUI). This process of restructuring our program to make it cleaner and more reusable is called refactoring.

Question Number 3: How do I implement this part in Intellij?

Want to design a new type of object: each Question object will represent one math question. For example, one question like "3 + 11 = 14". This question object will have to know the input values (3 and 11) and the operator (plus) of the question, as well as the expected answer (14). Should be able to ask a Question object to do things like:

prints itself as a quiz question (without showing the answer!); check to see if a student answer is correct or not; [maybe?] print a message saying what the correct answer was?

There are lots of possible ways could design the Question class, some good, some not so good. Below is a UML class diagram of one possible design, which should be a reasonably good design for our math game.

Note: there are two different constructors shown in this class diagram:

The lower-level constructor takes the input values and operator as arguments. This makes the constructor easy to write, but requires more work from the client code (the code that calls the constructor) to generate all those values. The higher-level constructor takes just a random number generator and uses that to generate all the values it needs. This makes the constructor a bit harder to write, but makes the client code easier.

Implement both, and compare them.

Question

-value1 : int

-value2 : int

-operator : String

-answer : int

+showQuestion() // to System.out

+checkAnswer(int response) : bool

+Question(v1:int, v2:int, op:String)

+Question(rand : Random)

Now should implement this Question class in the program, and then use it to generate all the question objects that need in the game. Here are the steps to design this Question class:

In IntelliJ, right-click on the package where want to add the Question class and do: New / Java Class. Type in Question as the name of the class, and then create it. Inside new class, add the four data fields shown above. For example: private int value1; Add the showQuestion() method. This has no return type, so it's type will be void. The '+' in the UML class diagram means it is public, so will need: public void showQuestion() { }. Then fill in the code inside that method, so that it prints the question out to System.out, with a question mark on the end. Add the constructor (whichever one 've chosen). This must also be public, will have no return type (because it always returns a new Question object), and its name must be Question. The input parameters will be the parameters shown in the UML class diagram, but will have to translate that UML notation into Java variable declarations (type, then variable name). The job of the constructor is to initialise all the data fields. As a temporary first version of code inside the constructor, suggest just set them to fixed values, like this: value1 = 3; value2 = 5; etc. Run game to see what it does now. It probably prints the question twice? Once because the q1 object is printing the question, and once because old code in main() is also printing the question. So, should now be able to delete the lines of old code that print the question. Run the program again to make sure only print the question once. Time to fix up that temporary constructor inside the Question class. Edit the code inside the constructor so that it sets up the data fields with the correct values - either the values given as parameters, or by using the rand object to generate the values it needs. Now try to call the checkAnswer(response) method of r q1 object. Design this just after have read the response from the child playing the game. Ah, will have to implement the checkAnswer method inside Question class before can call it! I suggest that make that method responsible for checking the response against the correct answer, and also printing either a message to congratulate them on getting the correct answer, or to commiserate with them for getting the wrong answer. Run program again and see what it does. should be able to remove even more code from r main method now, since all the answer checking is done inside the Question.checkAnswer method.

Can extend main method a bit more so that it keeps track of the score? Each time a Question is answered correctly, the score should be incremented by one.

Hint: to know when to increment this score, could save the result of the checkAnswer(...) call into a variable called good, and then add a Java if statement to increment r score only when good is true.

Question Number 4: How do I implement this part in Intellij?

So far, the game only does additions, and maybe subtractions, which is a bit boring. Now extend it so that we get a random mix of addition, subtraction multiplication, and division questions.

There is less guidance in this section, so more room for to problem solve when hit issues. Here are some general guidelines:

should use new Question objects for all these kinds of questions; The code for choosing (randomly) between different kinds of questions could go inside r Question constructor if are using the constructor with the Random generator parameter, or inside main method if are using the other Question constructor with just integer and String values. An easy way of choosing between the four different kinds of questions is to use Random number generator to generate an integer from 0..3 as follows, and then decide that 0 means addition, 1 means subtraction, 2 means multiplication, and 3 means division.

. Write program to print all alphabets from a to z. - using while loop a program to read data using CL register and check whether it's positive or negative.

Now comes the exciting bit: using new objects!

Go into Main class, in the main(...) method, and see where are generating the question inputs. Just after that point, add a line like the following one to design a new Question object (the '???' parameters will be different, depending upon which constructor 've chosen to use): Question q1 = new Question( ??? );

q1.showQuestion();

The board of directors of the company has two options for the business strategy expansion, firstly by acquiring shares of an existing plantation company in Terengganu to exercise significant influence over the business operations. Secondly, through joint venture arrangements, both parties could share costs and risks. The company's Chairman seeks the management team to do some study and come out with the best recommendation between these two options to be proposed in the BOD meeting for the strategic planning of EZ Bhd business expansion strategy.

The written report for the business expansion strategy whether to invest as an associate company or joint venture should be handed over to BOD at the earliest date possible for the BOD to discuss in the meeting. The guide for the report is as follows: require including:

(1) Problem identification,

Bingo Ltd. ("the Company") has a fiscal year ending December 31. For the year ending December 31, 2021, the Company's income statement is as follows: Revenues $1,093,000 Expenses: Cost Of Goods Sold ($206,000) Administrative Costs ( 152,000) Amortization Expense ( 186,000) Increase in warranty reserves (32,000) Other Expenses ( 119,000) ( 695,000) Income Before Tax Expense $398,000 Income Tax Expense: Current ($ 104,000) Future ( 47,000) ( 151,000) Net Income $247,000 Other Information: 1. During the year, $8,000 was spent on landscaping for its new facilities. For accounting purposes this was capitalized as an asset. The Company believes the work has an unlimited life and has decided not to amortize this balance. 2. The Company incurred legal costs to make amendments to its articles of incorporation in 2021. These legal costs totalling $9,500 were included in Other Expenses. 3. On January 1, 2021, the Company has UCC balances for its tangible assets as follows:

Class 1 (4% CCA rate) $450,000 Class 14.1 (5% CCA rate) Nil The Class 1 balance relates to a single building acquired in 2007 at a cost of $600,000 including the surrounding land. The value and cost of the land at the time of acquisition was $50,000. On February 10, 2021, this building and the land are sold for a total of $662,000. The value of the land is unchanged at $50,000. In the accounting records, this real property was carried at $557,000, $507,000 for the building and $50,000 for the land. The resulting gain on the building is included in the accounting revenues. The old building is replaced on February 15, 2021 with a new building acquired at a cost of $733,000 of which $60,000 is allocated to land. The Company chose not to put the new building into a separate Class 1 so it does not qualify for the 6 percent CCA rate. No elections are made with respect to the replacement of the building. 4. The Company was late on paying some income tax instalments as well as some municipal tax payments, resulting in interest being incurred in the amounts of $780 and $320, respectively. This interest was included in Other Expenses. 5. The Company would like to deduct the maximum CCA allowable for the year.

A) Determine the 2021 minimum Net Income For Tax Purposes. Please calculate the January 1, 2022 UCC for all of The Company's CCA classes. Show all of your work whether or not you feel it is relevant to your final answer. [15 Marks] B) Explain, in words, the reason for the inclusion (or exclusion) of each item in your calculation of the Company's net income in Part A. You can use point form.

Households preferences are given by U = u (c1, c2, n1, n2) = c1 n 2 1 + c 2 2 n2 , where ct 0 is consumption in period t {1, 2} and nt 0 is lab or supply. Labor is used to produce output with the technology yt = Ant (there is no capital). The wage is thus given by wt = A, for t {1, 2}. The government taxes labor income at rates t in period t, so households' intertemporal budget constraint is given by 1 1 c1 + c2 = (1 1)An1 + (1 2)An2 1 + r 1 + r The government has constant expenditues, gt = g for t {1, 2}. Its intertemporal budget constraint is thus given by 1 IBC (1An1 g1) + (2An2 g2) = 0 1 + r Finally, the resource constraints in the economy are y1 = An1 = c1 + g and y2 = An2 = c2 + g. 1) Consider the household's optimal consumption and labor-supply problem. Argue that the solution is interior only if the interest rate r is such that 1 = . 1+r Assume that this is the case for the rest of the exercise. 2) Solve for the household's optimal n1 and n2 as functions of 1 and 2. 3) Use the two resource constraints to replace ct = Antg into U. Next, use the previous result to replace nt with a function of t . You should now have expressed the household's utility U as a function of the two tax rates: U = U(1, 2) 4) Do the same for the government's intertemporal buget: replace nt with the function of t that you found in part 2 so as to express IBC in terms of 1 and 2 : IBC = IBC(1, 2) 5) It follows that the optimal policy is given by the combination of 1 and 2 that solves the following problem: maxU(1, 2) s.t. IBC(1, 2) = 0 Prove that the optimal policy satisfies 1 = 2 (tax smoothing). 6) Suppose that we increase g1 but reduce g2 so that g1 + g2 stays constant. What happens to the optimal taxes? Explain

1. Assume that corn is produced in a perfectly competitive market. Farmer Roy is a typical producer of corn.

(a) Assume that Farmer Roy is making zero economic profit in the short run. Draw a correctly labeled side-by side graph for the corn market and for Farmer Roy and show each of the following.

(i) The equilibrium price and quantity for the com market, labeled as PMI and QMI, respectively

(ii) The equilibrium quantity for Farmer Roy, labeled as QFI

(b) For Farmer Roy's com, is the demand perfectly elastic, perfectly inelastic, relatively elastic, relatively inelastic, or unit elastic? Explain.

(c) Corn can be used as an input in the production of ethanol. The demand for ethanol has significantly increased.

(i) Show on your graph in part (a) the effect of the increase in demand for ethanol on the market price and quantity of corn in the short run, labeling the new equilibrium price and quantity as PM2 and QM2' respectively.

(ii) Show on your graph in part (a) the effect of the increase in demand for ethanol on Farmer Roy's quantity of corn in the short run, labeling the quantity as QF2

(iii) How does the average total cost for Farmer Roy at QF2 compare with PM2?

(d) Corn is also used as an input in the production of cereal. What is the effect of the increased demand for ethanol on the equilibrium price and quantity in the cereal market in the short run? Explain

7) The rate at which one good can be converted technologically into another is called

A) the marginal rate of transformation.

B) the marginal rate of substitution.

C) the marginal product of labour.

D) rate of conversion.

E) the marginal product of capital.

8) The Solow residual is a measure of

A) average labour productivity. B) average capital productivity.

C) total factor productivity.

D) the rate of growth of real GDP.

E) the marginal product of labour.

9) Consider the choice of the consumer in the endowment model of Chapter 9. The consumer receives 50 units of goods in the current period, and pays a lump-sum tax of 10 units in the current period. If the consumer consumes 60 units in the current period, then her/his savings is

A) -20

B) 10

C) 0

D) 10

Exercise 1: One-Consumer, Two-Producer Economy

We consider an economy in which there are a representative consumer and two firms j = 1,2 producing two goods = 1,2. The consumer supplies an exogenous quantity of labour L. Firm 1 produces good I by using a production function F. (Z, L) where Z, L1 are respectively the quantity of good 2 and labour. Similarly, firm 2 produces good 2 with a production function F(Z, L) where Zi, L2 are respectively the quantity of good 1 and labour. Let denote by w, P1, P2 >>0 wages and prices of good 1 and good 2. The consumer is also the firms owner.

1. Let denote R, the consumer's total revenue. Her/his utility function is given by u(11, 1) =

(i) Derive the consumer's Walrasian/Marshallian demand functions. Compute her/his indi rect utility function.

(ii) Derive the consumer's Hicksian demand functions. Compute her/his expenditure function.

2. Assume that F(-) = 32/L and F(-) = 32/L. Derive the factor demand functions 1/3, and supply functions of good 1 by firm 1 and firm 2. Compute their profit.

3. Define and then compute the general equilibrium for this economy.

(Hint):Do we have a GE for this economy

[4:52 PM, 1/18/2022] Muthuri: Question:

5.12 A survey conducted by Certified Practising Accountants Australia to investigate the reaction to new audit standards issued by the Australian Auditing and Assurance Standards Board found that only 53% of auditors believed that the new standards had improved audit quality. Fifty-eight per cent of auditors felt that the standards had improved confidence in financial reporting. Assume that these two events (improved quality and improved confidence) are independent. Suppose 20 auditors from Australia are selected at random.

a. What is the probability that fewer than 15 of them believe that the standards have improved confidence in financial reporting?

b. What is the expected number of auditors who believe that the standards have improved confide... [4:52 PM, 1/18/2022] Muthuri: Question: Hassan and Dana had bought a property valued at $1,225,000 for 20% down and a mortgage amortized over 25 years on March 1, 2018. They made equal end-of-month payments towards their mortgage. Interest on the mortgage was 3.29% compounded semi-annually and the mortgage was renewable after five years.

What is the size of each monthly payment?

What is the cost of the mortgageforthe first 5years?

In November2020,theydecidedtorefinancetheirmortgagefortworeasons:rateswere down by quite a lot, and they also wanted to pay off some Line of Credit debt they had accumulated. Suppose the new rate they qualified for was 1.74% compounded semi-annually and they could borrow $1,060,000 from the bank to cover their remaining mortgage balance and LOC debt. The new mortgage is amortized over 25 years, but they also need to pay a penalty for breaking the old mortgage early.

If the penalty is the interest differential over the remaining term of the old mortgage (under the old and the new rates), and if the penalty is also added to the new mortgage, what is the size of their new monthly payment?

[4:52 PM, 1/18/2022] Muthuri: Question:

5.12 A survey conducted by Certified Practising Accountants Australia to investigate the reaction to new audit standards issued by the Australian Auditing and Assurance Standards Board found that only 53% of auditors believed that the new standards had improved audit quality. Fifty-eight per cent of auditors felt that the standards had improved confidence in financial reporting. Assume that these two events (improved quality and improved confidence) are independent. Suppose 20 auditors from Australia are selected at random.

a. What is the probability that fewer than 15 of them believe that the standards have improved confidence in financial reporting?

b. What is the expected number of auditors who believe that the standards have improved confide... Hassan and Dana had bought a property valued at $1,225,000 for 20% down and a mortgage amortized over 25 years on March 1, 2018. They made equal end-of-month payments towards their mortgage. Interest on the mortgage was 3.29% compounded semi-annually and the mortgage was renewable after five years.

What is the size of each monthly payment?

What is the cost of the mortgageforthe first 5years?

In November2020,theydecidedtorefinancetheirmortgagefortworeasons:rateswere down by quite a lot, and they also wanted to pay off some Line of Credit debt they had accumulated. Suppose the new rate they qualified for was 1.74% compounded semi-annually and they could borrow $1,060,000 from the bank to cover their remaining mortgage balance and LOC debt. The new mortgage is amortized over 25 years, but they also need to pay a penalty for breaking the old mortgage early.

If the penalty is the interest differential over the remaining term of the old mortgage (under the old and the new rates), and if the penalty is also added to the new mortgage, what is the size of their new monthly payment?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Managerial Accounting Decision Making and Performance Management

Authors: Ray Proctor

4th edition

273764489, 978-0273764489

More Books

Students also viewed these Programming questions