In the RMON hostTopN table (20.14.1.4 Host Top N), the agent does all the report-building work. Would it be possible for the manager to do this? If not, why not? If so, why do you think RMON provides this table?
In: Computer Science
4. Rewrite the following pseudocode segment using a loop structure in the specified languages:
k = (j + 13) / 27
loop:
if k > 10
then goto out
k = k + 1
i = 3 * k - 1
goto
loop
out: . . .
a. C++
b. Python
c. Ruby
Assume all variables are integer type. Discuss the relative merits of the use of these languages for this particular code.
In: Computer Science
2. Let the function fun be defined as
int fun(int*k) {
*k += 4;
return 3 *
(*k) - 1;
}
Suppose fun is used in a program as follows:
void main() {
int i = 10, j
= 10, sum1, sum2;
sum1 = (i / 2) + fun(&i);
sum2 = fun(&j) + (j / 2);
}
What are the values of sum1 and sum2
a. operands in the expressions are evaluated left to right?
b. operands in the expressions are evaluated right to left?
In: Computer Science
This program extends the earlier "Online shopping cart" program. (Consider first saving your earlier program).
(1) Extend the ItemToPurchase class to contain a new attribute. (2 pts)
Implement the following method for the ItemToPurchase class.
Ex. of print_item_description() output:
Bottled Water: Deer Park, 12 oz.
(2) Build the ShoppingCart class with the following data attributes and related methods. Note: Some can be method stubs (empty methods) initially, to be completed in later steps.
Ex. of print_total() output:
John Doe's Shopping Cart - February 1, 2016 Number of Items: 8 Nike Romaleos 2 @ $189 = $378 Chocolate Chips 5 @ $3 = $15 Powerbeats 2 Headphones 1 @ $128 = $128 Total: $521
Ex. of print_descriptions() output:
John Doe's Shopping Cart - February 1, 2016 Item Descriptions Nike Romaleos: Volt color, Weightlifting shoes Chocolate Chips: Semi-sweet Powerbeats 2 Headphones: Bluetooth headphones
(3) In main section of your code, prompt the user for a customer's
name and today's date. Output the name and date. Create an object
of type ShoppingCart. (1 pt)
Ex.
Enter customer's name: John Doe Enter today's date: February 1, 2016 Customer name: John Doe Today's date: February 1, 2016
(4) In the main section of your code, implement the print_menu()
function. print_menu() has a ShoppingCart parameter, and outputs a
menu of options to manipulate the shopping cart. Each option is
represented by a single character. Build and output the menu within
the function.
If the an invalid character is entered, continue to prompt for a
valid choice. Hint: Implement Quit before implementing other
options. Call print_menu() in the main() function. Continue to
execute the menu until the user enters q to Quit. (3 pts)
Ex:
MENU a - Add item to cart r - Remove item from cart c - Change item quantity i - Output items' descriptions o - Output shopping cart q - Quit Choose an option:
(5) Implement Output shopping cart menu option. (3 pts)
Ex:
OUTPUT SHOPPING CART John Doe's Shopping Cart - February 1, 2016 Number of Items: 8 Nike Romaleos 2 @ $189 = $378 Chocolate Chips 5 @ $3 = $15 Powerbeats 2 Headphones 1 @ $128 = $128 Total: $521
(6) Implement Output item's description menu option. (2 pts)
Ex.
OUTPUT ITEMS' DESCRIPTIONS John Doe's Shopping Cart - February 1, 2016 Item Descriptions Nike Romaleos: Volt color, Weightlifting shoes Chocolate Chips: Semi-sweet Powerbeats 2 Headphones: Bluetooth headphones
(7) Implement Add item to cart menu option. (3 pts)
Ex:
ADD ITEM TO CART Enter the item name: Nike Romaleos Enter the item description: Volt color, Weightlifting shoes Enter the item price: 189 Enter the item quantity: 2
(8) Implement remove item menu option. (4 pts)
Ex:
REMOVE ITEM FROM CART Enter name of item to remove: Chocolate Chips
(9) Implement Change item quantity menu option. Hint: Make new
ItemToPurchase object before using ModifyItem() method. (5
pts)
Ex:
CHANGE ITEM QUANTITY Enter the item name: Nike Romaleos Enter the new quantity: 3.
Type in Python please.
In: Computer Science
. Consider QuickSort on the array A[1:n] and assume that the pivot element x (used to split the array A[lo:hi] into two portions such that all elements in the left portion A[lo:m] are ≤x and all elements in the right portion A[m:hi] are ≥x) is the second element of the array to be split (i. e., A[lo+1]).
For a specific value of n at least 13 (your choice), construct an assignment of the numbers 1...n to the n array elements that causes QuickSort, with the stated choice of pivot, to
(a) execute optimally (that is A[lo:m] and A[m:hi] are always of equal size)
(b) execute in the slowest possible way.
In: Computer Science
In: Computer Science
Using Java 8. Write a program that reads an expression in postfix notation, builds the expression tree and prints the expression in prefix and infix notation and evaluates the expression. (Hint use a stack)
In: Computer Science
Solve the below questions using your own words
PLEASE!! Make sure to write by your own words or paraphrase
1. What is the difference between Windows and Linux server
2. Give some advantages and disadvantages Windows and Linux Operating System
In: Computer Science
In: Computer Science
REQUIREMENTS
Example of the program output:
Example 1:
Enter the number of elements: 5
Index Element
4 129
3 138
2 134
1 98
0 84
Example 2:
Enter the number of elements: 12
Index Element
11 109
10 80
9 122
8 84
7 142
6 114
5 114
4 111
3 82
2 91
1 132
0 113
In: Computer Science
Create the table users with four columns: user_id, email_address, first_name, and last_name. Make user_id as the primary key. For each column, use the data type specified in the schema.
In: Computer Science
Create a basic VI by using labVIEW software.
Kindly share screenshot of basic VI
In: Computer Science
f_access = open("queries.json")
query_string = f_access.read()
p_object_queries = json.loads(query_string)
f_access.close()
What is the type of f_access?
What is the type of query_string?
What is the type of p_object_queries?
Thank you!!!!
In: Computer Science
Message passing is both time- and space-coupled – that is, messages are both directed towards a particular entity and require the receiver to be present at the time of the message send. Consider the case of using the learning platform, where you connect using URL “learning rather than an IP address and this name is resolved using DNS. Does such a system exhibit the same level of indirection?
In: Computer Science