Question: Take note this is in java programming.Please answer them in java language. The following remarks apply specifically for programming questions, if any: 1. Compile and

 Take note this is in java programming.Please answer them in javalanguage. The following remarks apply specifically for programming questions, if any: 1.

Take note this is in java programming.Please answer them in java language.

The following remarks apply specifically for programming questions, if any: 1. Compile and test all codes before submitting to ensure that they are error free. 2. Provide the necessary comments in your source codes. 3. Include both codes and sample outputs (e.g. screen shots) in your answer script, i.e. Word document. Additionally, attach also the original source codes (e.g. *.java files) in the final zipped file for submission. 4. Note the differences between the codes for a complete Java program and Java method. Java program comprises all codes needed for compilation and execution of a runnable system. A complete Java program can include multiple methods and method calls. Modularity makes the entire program more readable and easier to debug. You should always strive to modularize your codes. A Java method on the other hand is limited to the implementation of procedure/function performing a specific task. 5. Hence, read each question requirements properly in order to avoid loosing marks unnecessarily. 2

Question 3 a) Determine the order in big-oh notation and plain English for an algorithm that has as a growth-rate function f(m) where n 0,1,2, given as follows f(n) 8 loga n f(n) n logan 6n iv. f(n) 3+ 2 v. f(n) 10 marks (b) Compare both functions n2 and 2n/4 for various values of n. Determine a situation where the second function is bigger than the first function. What can you conclude from both functions in terms of growth rate? [5 marks]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!