Questions
In implicit objects of a server, explain the differences between the application and session variables.

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...

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 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...

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...

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.

  1. The program will first ask users to key in their taxable annual income.
  2. Depending on the income level, the program will calculate the tax owed. Using the following table as reference:

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?

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...

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...

Write a well-commented java program that demonstrates the use of loops, and generation of random integers (Code will be written in Dr. Java)

  1. You are taking some time off from your paint business and currently are on vacation in Bahamas.
  2. You decide to write a Java program that generates 10 random numbers between 1 and 20 (all integers).
  3. You cannot use arrays (even if you know what they are) to store these numbers.
  4. It then picks up the largest number among them and prints a multiplication table until that number.
  5. While your program is generating random numbers, it keeps track of the number of 6’s generated.
    1. If more than two 6’s are generated, your program should print “HURRAY!! DOUBLE SIXES GENERATED”.
    2. If two 6’s are not generated, it should print “SORRY!! DOUBLE SIXES NOT ENCOUNTERED”.

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....

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:

  • Private fields
  • Create a default constructor
    • string itemName - Initialized in default constructor to "none"
    • float itemPrice - Initialized in default constructor to 0.0
    • int itemQuanity - Initialized in default constructor to 0
    • string itemDescription - Initialized in default constructor to "none"
  • Parameterized constructor to assign item name, item description, item price, and item quantity
  • Public member methods
    • setDescription() mutator & getDescription() accessor
    • setName() mutator & getName() accessor
    • setQuantity() mutator & getQuantity() accessor
    • setPrice() mutator & getPrice() accessor
    • printItemCost() - Outputs the item name followed by the quantity, price, and subtotal
    • printItemDescription() - Outputs the item name and description

Ex. of printItemCost() output:

Bottled Water 10 @ $1 = $10

Ex. of printItemDescription() output:

Bottled Water: Deer Park, 12 oz.

(2) Create two new files:

  • ShoppingCart.java - Class definition
  • ShoppingCartManager.java - Contains main() method

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

  • addItem()
    • Adds an item to cartItems array. Has parameter ItemToPurchase. Does not return anything.
  • removeItem()
    • Removes item from cartItems array. Has a string (an item's name) parameter. Does not return anything.
    • If item name cannot be found, output this message: Item not found in cart. Nothing removed.
  • modifyItem()
    • Modifies an item's description, price, and/or quantity. Has parameter ItemToPurchase. Does not return anything.
    • If item can be found (by name) in cart, check if parameter has default values for description, price, and quantity. If not, modify item in cart.
    • If item cannot be found (by name) in cart, output this message: Item not found in cart. Nothing modified.
  • getNumItemsInCart()
    • Returns quantity of all items in cart. Has no parameters.
  • getCostOfCart()
    • Determines and returns the total cost of items in cart. Has no parameters.
  • printTotal()
    • Outputs total of objects in cart.
    • If cart is empty, output this message: SHOPPING CART IS EMPTY
  • printDescriptions()
    • Outputs each item's description.

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 details, explain the two types of software?

  1. In details, explain the two types of software?

In: Computer Science

11) How to bind property?

11) How to bind property?

In: Computer Science

Programming lang C++ Write a program that reads 10,000 words into an array of strings. The...

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...

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

The set of all strings consisting of an uppercase letter followed by zero or more additional...

The set of all strings consisting of an uppercase letter followed by zero or more additional characters, each of which is either an uppercase letter or one of the digits 0 through 9


Show the syntax diagram

In: Computer Science

Compare between malware that spread conceal in a table?

Compare between malware that spread conceal in a table?

In: Computer Science