Questions
Write an assembly language program that repeatedly prompts the user to enter signed decimal integer numbers....

Write an assembly language program that repeatedly prompts the user to enter signed decimal integer numbers. The program should be run from the command prompt, output a text prompt to the screen, and then wait for the user to type in a number followed by the Enter key. (The legitimate range of user input values is any signed integer that can be represented in 32 bits.) After each number is entered, the program should determine and display the following information about the number: whether it is positive or negative; whether or not it is evenly divisible by 16; and whether or not it can be represented in 16 bits (in other words, is it in the range -32768 x +32767). For example, if the user entered the number +5, the output generated by the program should look similar to this:
+5 is a positive number.
+5 is not evenly divisible by 16.
+5 can be represented in 16 bits.
On the other hand, if the user entered -32816, the output would look like this:
-32816 is a negative number.
-32816 is evenly divisible by 16.
-32816 cannot be represented in 16 bits.
After determining and displaying the above information, the program should prompt the user to enter another number. This process should continue until the user enters the value 0 (which is neither positive nor negative). At that point, execution should terminate and return to the command prompt.
Assemble, link, and test your program. Make sure to test it for each of the eight possible input cases (permutations of positive vs. negative, divisible by 16 vs. not divisible by 16, and fits in 16 bits vs. does not fit in 16 bits), as well as the ninth possibility (the special case of 0, which exits the program). When you are sure it is working, run it from the command prompt and capture a screen shot(s) of a test run that illustrates all nine possibilities and the corresponding outputs.

In: Computer Science

Complete a 250-400-word description of the purpose of a RADIUS server and how RADIUS accomplishes authentication...

Complete a 250-400-word description of the purpose of a RADIUS server and how RADIUS accomplishes authentication and authorization of remote connections.

In: Computer Science

Encryption vs. Encoding/Obfuscation Give a detailed paper discussing the differences between encryption and encoding. Expand upon...

Encryption vs. Encoding/Obfuscation
Give a detailed paper discussing the differences between encryption and encoding. Expand upon the use of these in the execution of malware. Discuss the different forms of encryption, their history, and implementations.

In: Computer Science

7.7 Ch 7 Program: Online shopping cart (continued) (C) This program extends the earlier "Online shopping...

7.7 Ch 7 Program: Online shopping cart (continued) (C)

This program extends the earlier "Online shopping cart" program. (Consider first saving your earlier program).

(1) Extend the ItemToPurchase struct to contain a new data member. (2 pt)

  • char itemDescription[ ] - set to "none" in MakeItemBlank()

Implement the following related functions for the ItemToPurchase struct.

  • PrintItemDescription()
    • Has an ItemToPurchase parameter.


Ex. of PrintItemDescription() output:

Bottled Water: Deer Park, 12 oz.


(2) Create three new files:

  • ShoppingCart.h - struct definition and related function declarations
  • ShoppingCart.c - related function definitions
  • main.c - main() function (Note: main()'s functionality differs from the warm up)

Build the ShoppingCart struct with the following data members and related functions. Note: Some can be function stubs (empty functions) initially, to be completed in later steps.

  • Data members (3 pts)
    • char customerName [ ]
    • char currentDate [ ]
    • ItemToPurchase cartItems [ ] - has a maximum of 10 slots (can hold up to 10 items of any quantity)
    • int cartSize - the number of filled slots in array (number of items in cart of any quantity)
  • Related functions
    • AddItem()
      • Adds an item to cartItems array. Has parameters ItemToPurchase and ShoppingCart. Returns ShoppingCart object.
    • RemoveItem()
      • Removes item from cartItems array (does not just set quantity to 0; removed item will not take up a slot in array). Has a char[ ](an item's name) and a ShoppingCart parameter. Returns ShoppingCart object.
      • 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 parameters ItemToPurchase and ShoppingCart. Returns ShoppingCart object.
    • GetNumItemsInCart() (2 pts)
      • Returns quantity of all items in cart. Has a ShoppingCart parameter.
    • GetCostOfCart() (2 pts)
      • Determines and returns the total cost of items in cart. Has a ShoppingCart parameter.
    • PrintTotal()
      • Outputs total of objects in cart. Has a ShoppingCart parameter.
      • If cart is empty, output this message: SHOPPING CART IS EMPTY
    • PrintDescriptions()
      • Outputs each item's description. Has a ShoppingCart parameter.


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 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. (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) Implement the PrintMenu() function. 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 function.

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() 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 the "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 Headphones 1 @ $128 = $128

Total: $521


(6) Implement the "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 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 the "Remove item from cart" 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() function. (5 pts)

Ex:

CHANGE ITEM QUANTITY
Enter the item name:
Nike Romaleos
Enter the new quantity:
3

In: Computer Science

C++ Project Organization Create a project called Project1 and then name and organize the following programs...

C++

Project Organization

Create a project called Project1 and then name and organize the following programs under it.

Part 1 CircleArea

You are going to write a program to compute and output the area of a circle with a radius of 2.5.

Think through what you need to do:

Create a variable for radius

set it to 2.5

Create a variable for area

set it to 3.14159 * radius * radius

output the value of area

Challenge (not required)

Generalize this so that you can input any radius and the program will output the area for it.

Part 2 TicTacShmoe

Write a program that prints out three different tic tac toe winning results. Make each one bigger than the last, separated by more spaces and lines:

1 0 0

0 1 0

0 0 1

0 0 1

0 1 0

1 0 0

The goal is to give you practice with the cout statements in C++

Part 3 TriangleArea

Write a program called TriangleArea, which calculates and outputs the Area of a triangle with a Base value of 3.5 and a Height value of 4.85. The formula for the area of a triangle is: 1/2 ×???? × ????ℎ?.

Your program should output correct answer.

Part 4 MilesToKilometers

Write a program that will tell me the conversion of 60 miles, into kilometers. Remember that 1 mile is 1.60934 kilometers.

Part 5 MyInitials

Write a sequence of cout statements to display your initials (2 – 3 letters) using a cool pattern for each letter.

>My Initial is BL

For example, here is a simple pattern for the initials IL:

II LL

II LL

II LL

II LL

II LL

II LL

II LL

II LL LL LL LL

Use around 8 cout statements to complete this exercise.

Part 6 DoubleUp

Write a program that ask the user to input a number. Then tell them, What double up is. For example, if the user inputs a 7, the program should output ~Double up is 14~

In: Computer Science

def vend():     a = {'key': '0', 'item': 'choc', 'price': 1.50, 'stock': (2)}     b = {'key': '1',...

def vend():

    a = {'key': '0', 'item': 'choc', 'price': 1.50, 'stock': (2)}

    b = {'key': '1', 'item': 'pop', 'price': 1.75, 'stock': 1}

    c = {'key': '2', 'item': 'chips', 'price': 2.00, 'stock': 3}

    d = {'key': '3', 'item': 'gum', 'price': 0.50, 'stock': 1}

    e = {'key': '4', 'item': 'mints', 'price': 0.75, 'stock': 3}

    items = [a, b, c, d, e]

    

    def show(items):

        cim = 0

        for item in items:

            if item.get('stock') == 0:

                items.remove(item)

        for item in items:

            print(item.get('key'), item.get('item'),item.get('price'), item.get('stock'))

        selected = input('select item: ')

        for key in items:

            if selected == key.get('key'):

                selected = key

                price = selected.get('price')

                while cim < price:

                    cim = cim + float(input('insert ' + str(price - cim) + ': '))

                print('vend: ' + selected.get('item'))

                selected['stock'] -= 1

                cim -= price

                print('refunded: ' + str(cim))

                if cim != 0:

                    print("credit: $0.00")

                    break

                else:

                    continue   

    show(items)

vend()

instead of showing the items can you make it so the user has to input "items"

and instead can you make it so it shows credit everytime you insert a coin

and instead of insert numbers can you make it you have to type dime to insert .10 and nickel to insert .05 and quarter to insert .25

and can you make it possible for the user to restock something

In: Computer Science

Suppose the program counter (PC) is set to 0x2000FFFC. Is it possible to use the jump...

Suppose the program counter (PC) is set to 0x2000FFFC. Is it possible to use the jump (j) MIPS assembly instruction to jump directly to the instruction at 0x10003000? If yes, write the corresponding assembly instruction(s). If not, explain why and give other MIPS instruction(s) that can jump to this target address. (For this problem, assume that the instruction memory starts from 0x00000000 and goes to 0xFFFFFFFF.)

In: Computer Science

The world of wireless and mobile devices is evolving day-to-day, with many individuals relying solely on...

The world of wireless and mobile devices is evolving day-to-day, with many individuals relying solely on their wireless devices in the workplace and in the home. The growing use of mobile devices demands that organizations become more educated in securing this growing technology and determining how to best protect their assets.

Explore and discuss the risk assessments, threats, and vulnerabilities of wireless networks, and mobile device security as well as the security measures that should be put in place to mitigate breaches.

In: Computer Science

Consider the "typical-case" performace for the search algorithsms. In orther words the average number of comparisons...

Consider the "typical-case" performace for the search algorithsms. In orther words the average number of comparisons needed over all possible positions where the elements can be found.

a) used to locate and element in a list of n terms with linear search

b) used to locate an element in a list of n= n^k terms using binary search.

In: Computer Science

Suppose Alice and Bob have RSA public keys in a file on a server. They communicate...

Suppose Alice and Bob have RSA public keys in a file on a server. They communicate regularly, using authenticated, confidential message. Eve wants to read the messages but is unable to crack the RSA private keys of Alice and Bob. However, she is able to break into the server and alter the file containing Alice’s and Bob’s public keys.

(1) How should Eve alter the file to so that she can read confidential messages sent between Alice and Bob, and forge messages from either?

(2) How might Alice and/or Bob detect Eve’s subversion of the public keys?

In: Computer Science

Please Use matlab and show command window. Please go through all steps Using a Dialog button...

Please Use matlab and show command window. Please go through all steps

Using a Dialog button with 3 buttons have the user chose one of the 3 anonymous functions below to be used in the later selected three Programmed functions (1) Integral by Trapezoidal Method,(2) Integral by Simpson Method, or (3) Root by BiSection Method.:

a. f(x) = 2*x^5 -3*x^2 – 5

b. f(x) = x^2 – 5

c. f(x) = x^(1/2)

2. Using an input statement ask the user to pick Midpoint, Simpson, or ROOT. Make sure you are consistent with string or number. You can use what you are comfortable with. The input variable will then be used in a switch case statement. Each case will do the following

a. First case (Midpoint Integral) i. Ask for the three inputs a, b, and n ii. Call the function iii. Use fprintf to output the answer

b. Second case (Simpson Integral) i. Ask for the three inputs a, b, and n ii. Call the function iii. Use fprintf to output the answer

c. Third case (ROOTs) i. Ask for the three inputs a, b, and epsilon the convergence limit ii. Call the function iii. Use fprintf to output the answer

In: Computer Science

Write a SQL statement which joins the parts table with the supplier table and lists the...

  1. Write a SQL statement which joins the parts table with the supplier table and lists the part_name, supplier_name for all parts in the part table. The supplier_id column in the suppliers table is the primary key in the suppliers table, and this key has been exported to the parts table where it is a foreign key. You should use an inner join for this query.
  2. Write a SQL statement which joins the parts table with the suppliers table and lists the part_name, supplier_name. You should return all rows from the parts table whether or not there are corresponding rows in the supplier table. You should use an outer join for this query.
  3. Write a SQL statement which joins the parts table with the supplier table and lists the part_no, part_name, supplier_name from parts and suppliers table. Only return the parts supplied by ‘Fred Smith ..'. You should use an inner join for this query.
  4. The faculty table contains faculty information and has a faculty_id as the primary key. The faculty_department table has the department assignments for faculty members and has the faculty_id from the faculty table as an exported key or foreign key. The department table has information about departments and has a department_id column as its primary key. The faculty_department table also has the exported key or foreign key for the department table.

Write a SQL statement to display faculty_id, first name, last name, department_id, department name (need to joins the faculty table with the faculty_department table with the department table. )Use an inner join for this query.

In: Computer Science

Using the Titanic passenger dataset (titanic.csv). Is it better to split on gender or Pclass (1...

Using the Titanic passenger dataset (titanic.csv). Is it better to split on gender or Pclass (1 or not 1)? Compute information gain for each option and say which is best. Submit the gain and show your work and your choice.

- I cant upload the dataset on here. Can I send a link of it from google? What can I do?

In: Computer Science

Discuss tradeoffs between using the C++ STL list and vector.

Discuss tradeoffs between using the C++ STL list and vector.

In: Computer Science

What is the general principle behind software testing? Explain.

What is the general principle behind software testing? Explain.

In: Computer Science