In implicit objects of a server, explain the differences between the application and session variables.
In: Computer Science
Programming lang C++
Given a file of 100,000 unsorted integers, write a program that reads those integers into an array and sorts the integers in the array. The program should then prompt the user for an index, and then display the integer at that index.
For example, if the array contains ten integers and the contents are
79 4 42 51 12 22 33 17 91 10
after sorting, the integer at index 6 is 42
You are encouraged to use this data to test your program.
In: Computer Science
In web programming, what is the three tier architecture?
In: Computer Science
Write a Java program to read a set of integers from a file, dataX, and a set of ranges from a second file, rangeX, and, for each range [a, b] in rangeX, report the SUM of all the integers in dataX which are in the range [a, b]. As the integers are read from file dataX, insert them in a binary search tree. After all the integers have been inserted into the binary search tree, read the ranges from file rangeX and query the binary search tree to report the sum.
For instance, if file dataX has the integers (3, −2, 2, 5, 2, −6, 1) and file rangeX has the ranges ([−3, 4], [0, 5]) then the output should be:
Range [-3,4]. Sum = 6.
Range [0,5]. Sum = 13.
In: Computer Science
In this SLP assignment, we will get more practice with the concepts we have learned.
Read the following requirements, first write pseudo code based on your understanding, and then develop a Java application program based on your pseudo code.
Income tax bracket percentage:
0–$8,500: 10%
$8,500–$34,500: 15%
$34,500–$83,600: 25%
$83,600–$174,400: 28%
$174,400–$379,150: 33%
$379,150 and above: 35%
Hint: use the following as reference to write if and else
statement.
can someone help me complete this pleasee
In: Computer Science
obscuring security leads to a false sense of security describe how?
In: Computer Science
What is the difference between the following computing forms? Mention only one difference for each of the following:
a) Grid computing and cluster computing
b) Grid computing and cloud computing
c) Utility computing and cloud computing
In: Computer Science
Write a well-commented java program that demonstrates the use of loops, and generation of random integers (Code will be written in Dr. Java)
Sample Output 1
/*******************Bahamas Vacation Report BEGIN***************\
Generating random numbers……
4 6 3 11 9 2 6 20 11 3
“HURRAY!! DOUBLE SIXES GENERATED”
Largest random number is: 11
The multiplication table is as follows:
1 2 3 4 5 6 7 8 9 10
2 4 6 8 10 12 14 16 18 20
3 6 9 12 15 18 21 24 27 30
.
.
11 22 33 44 55 66 77 88 99 110
/*******************Bahamas Vacation Report END ***************\
Sample Output 2
/*******************Bahamas Vacation Report BEGIN***************\
Generating random numbers……
4 6 3 11 9 2 2 20 11 3
“SORRY!! DOUBLE SIXES NOT ENCOUNTERED”
Largest random number is: 11
The multiplication table is as follows:
1 2 3 4 5 6 7 8 9 10
2 4 6 8 10 12 14 16 18 20
3 6 9 12 15 18 21 24 27 30
.
.
11 22 33 44 55 66 77 88 99 110
/*******************Bahamas Vacation Report END ***************\
In: Computer Science
IN JAVA PLEASE!!!
Note: Creating multiple Scanner objects for the same input stream yields unexpected behavior. Thus, good practice is to use a single Scanner object for reading input from System.in. That Scanner object can be passed as an argument to any methods that read input.
(1) Create an ItemToPurchase class per the following specifications:
Ex. of printItemCost() output:
Bottled Water 10 @ $1 = $10
Ex. of printItemDescription() output:
Bottled Water: Deer Park, 12 oz.
(2) Create two new files:
Build the ShoppingCart class with the following specifications. Note: Some can be method stubs (empty methods) initially, to be completed in later steps.
Private fields
String customerName - Initialized in default constructor to "none"
String currentDate - Initialized in default constructor to "January 1, 2016"
ArrayList cartItems
Default constructor
Parameterized constructor which takes the customer name and date as parameters
Public member methods
getCustomerName() accessor
getDate() accessor
Ex. of printTotal() 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 printDescriptions() 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(), prompt the user for a customer's name and today's
date. Output the name and date. Create an object of type
ShoppingCart.
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) Implement the printMenu() method. printMenu() 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 method.
If the an invalid character is entered, continue to prompt for a
valid choice. Hint: Implement Quit before implementing other
options. Call printMenu() in the main() method. Continue to
execute the menu until the user enters q to Quit.
Ex:
MENU a - Add item to cart d - 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.
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.
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.
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.
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 and use ItemToPurchase modifiers before
using modifyItem() method.
Ex:
CHANGE ITEM QUANTITY Enter the item name: Nike Romaleos Enter the new quantity: 3
In: Computer Science
In: Computer Science
Programming lang C++
Write a program that reads 10,000 words into an array of strings. The program will then read a second file that contains an undetermined number of words and search the first array for each word. The program will then report the number of words in the second list that were found on the first list.
In: Computer Science
Create the database with at least 10 employees and 2 managers are populated. Important: your name should be in the employee table.
Write a Python code that can do the following:
1) Take an employee ID from user
2) Display the output of the SQL, select * from employee;
Improve the Python code above that can do the following:
1) Take an employee ID from the user. Let it be idEntered.
2) Get the departmentID for the given employeeID, idEntered. Let it be deptFound.
3) Check if idEntered is in the table manager
4) If yes, then execute: query = ("select * from employee where dID = %s; "). Note that since a variable deptFound is included in SQL, if it should be included, then use %s in SQL. And then declare a variable, data_tuple = (deptFound, ) in a separate line. Finally, execute the query cursor.execute(query, data_tuple).
5) if No, simply execute the SQL: select * from employee where eid = %s; do the similarly way for idEntered as above
In: Computer Science
In: Computer Science
Compare between malware that spread conceal in a table?
In: Computer Science