Problem
This problem is related to the virtual learning environment application discussed in one theory session and a few practicals. In
this problem, you are tasked with creating and updating learner profiles, a particular type of user. As well, given a learner profile,
we would like to retrieve the learning materials in the form of topics. Note that the learning materials for a given course will differ
from one learner profile to another. For example, for a course "Distributed Systems and Applications", the learning materials for
a learner with a weak background in "Programming" compared o another learner profile with a stronger background in
programming.
Your task is to:
1. Provide a description in OpenAPI of the API that allows for communication between a client and a service for the
functionalities discussed above;
2. Implement a corresponding client and a service.
Currently, XYZ Company decided to have a computer program that will automate the
computation and display the salary (net income) of their employees every payday. To
compute the salary of an employee, the company requires the following input data
such as: rate per hour, number of hours per day, number of days per week, and
number of weeks per month. In addition, the company also requires the obligatory
deduction of each employee which allocated for SSS contribution, Philhealth
contribution, Tax contribution, and Pagibig contribution. For pagibig contribution,
the deduction is fixed to P100.00 and the rest of each deduction value are coming
from the data entry or inputs of the user. In order compute the salary of the employee,
the company provide a certain formula such as:
(Pseudocoding and Flowcharting)
Q1. Determine the growth function and order of the following code fragment:
for (int count=0; count < n; count++)
{
for (int count2=0; count2 < n; count2=count2*2)
{
System.out.println(count, count2);
}
}
Q2. What is the order of the following growth functions?
a. 10n2 + 100n + 1000
b. 10n3 – 7
c. 2n + 100n3
d. n2 log n
Q3. Arrange the growth functions of Q4 in ascending order of efficiency for n=10 and again for n = 1,000,000.
Q1. Write the code necessary to find the largest element in an unsorted array of integers. What is the time complexity of this algorithm?
Q2. Determine the growth function and order of the following code fragment:
for (int count=0; count < n; count++)
{
for (int count2=0; count2 < n; count2=count2+2)
{
System.out.println(count, count2);
}
}
ABC Bookstore wanted to have a computer application for there daily sales
transaction. The computer application will compute and display total sales per
transaction and the discount amount which to be given for senior citizen, person with
disabilities, and with membership card of their establishment. Moreover, this
bookstore only sells the following books as follows: Math 1, Math 2, Math 3, Science
1, Science 2, Science 3, Introduction to Programming, VB. Net, Java, PHP for Web
Programming, Philosophy, Biology 2, and Daily Bread Book for Life. The price of each
book is not permanent and depends only based on the entry of the bookstore staff or
cashier. To those book(s) that will not be sold per transaction, their corresponding
prices is equivalent to zero, and those books sold per transaction, the prices of each
book vary to the entry of the bookstore staff or cashier. To get the total sales and
discount amount, consider the following:
(Flowcharting and Pseudocoding)
DEI Manufacturing company plans to give a year-end bonus to each of their employees. Draw a flowchart which will compute the bonus of an employee. Consider the following conditions: If the employee`s monthly salary is less than P2000.00, the bonus is 50% of the salary; for employees with salary greater than P2000.00, the bonus is P1500.00. Print the name and the corresponding bonus for each employee. Write the equivalent algorithm. (Pseudocoding and Flowcharting)
Define what an algorithm is and outline the characteristics of a good algorithm. Write the algorithms to display the Fibonacci series and the factorial value for a given number using Pseudo code. Determine the steps involved in the process of writing and executing a program.
Take a sample number and dry run the above two algorithms. Show the outputs at the end of each iteration and the final output. Examine what Big-O notation is and explain its role in evaluating efficiencies of algorithms. Write the Python program code for the above two algorithms and critically evaluate their efficiencies using Big-O notation.