Questions
X86 Assembly MASM Questions below ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;; Answer each question below by writing code at the...

X86 Assembly MASM

Questions below

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;; Answer each question below by writing code at the APPROPRIATE places at the end
;;;;; of the file as indicated.

;;;;; Q2: Write the directive to bring in the IO library          

;;;;; Q3: Create a constant called DAYS_PER_WEEK and initialize it to 5
;;;;;     Create a constant called WEEKS_PER_YEAR and initialize it to 49

;;;;; Q4: Create a constant called DAYS_PER_YEAR by using DAYS_PER_WEEK and
;;;;;     WEEKS_PER_YEAR (of Q3) in an integer expression constant

;;;;; Q5: Define an array of 10 signed doublewords, use any array name you like.
;;;;;     Initialize:
;;;;;   - the 1st element to the DAYS_PER_YEAR value defined in Q4
;;;;;   - the 2nd element to the hexadecimal value: B285
;;;;;   - the 3rd element to the 4-bit binary value: 1001
;;;;;   - the 4th element to the decimal value: -250
;;;;; and leave the rest of the array uninitialized.

;;;;; Q6. Define the string "Output = ", use any variable name you like.

;;;;; Q7. Define a prompt that asks the user for a negative number

;;;;; Q8. Write code to prompt the user for a number, using the prompt string that
;;;;;     you defined in Q7

;;;;; Q9. Write code to read in the user input, which is guaranteed to be negative

;;;;; Q10. Write code to print "Output = " and then print to screen the user input
;;;;;       which should be a negative value

;;;;; Q12. Write code to print "Output = " and then print the first element of the
;;;;;      array defined in Q5, without the + symbol in front.

;;;;; Q13. Build, run, and debug your code
;;;;; Your output should be similar to this (without the commented explanation)

;;;;; Enter a negative number: -10
;;;;; Output = -10                          
;;;;; Output = 245                          
;;;;; Press any key to continue . . .

;;;;; Q14. At the end of the source file, without using semicolons (;), add a comment
;;;;;      block to show:
;;;;;       - how bigData appears in memory. You should copy from the debugger memory
;;;;;        window and it should be the same 8 bytes as in lab 2)
;;;;;      - note that the 8 bytes in memory doesn't look identical to the 8 bytes
;;;;;        that are used to define bigData. Explain why the 8-byte sequence
;;;;;        are different

;;;;; 1pt EC (Extra Credit):
;;;;; In the same comment block, explain how many bytes the array of Q5 occupy
;;;;; in memory.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;   Put your answers below this line

.data
bigData QWORD 9876543210fedcbah       ; same bigData value as lab 2


.code
main PROC


   exit  
main ENDP

END main

In: Computer Science

Alcoa is the world's leading producer of primary aluminum, fabricated aluminum, and alumina. The following is...

Alcoa is the world's leading producer of primary aluminum, fabricated aluminum, and alumina. The following is a press release from the company:

Alcoa Announces 33% Increase in Base Dividend, 2-for -1 Stock Split

PITTSBURGH—Alcoa today announced that its Board of Directors approved a base quarterly dividend increase of 33.3%. Alcoa's announcement indicated that the new quarterly dividend would be 25 cents per share. It also stated that the Board of Directors declared a two-for-one stock split and reaffirmed its commitment to a stock repurchase program. Your boss, Mr. Scott, has written you a simple note to the effect, “What options do we have in accounting/reporting these actions as they take place?”

Required:

Respond to your boss (Mr. Living Scott) using a one page, 12 point-text memo. Be sure to include the following in your memo writeup:

  1. What are the two primary reporting alternatives Alcoa has in accounting for the repurchase of its shares? Hint: Think formal retirement versus treasury stock. Be sure to mention the effect of the optional courses of action on total shareholders' equity? What would be the effect of the optional courses of action on how stock would be presented in Alcoa's balance sheet?
  2. What are the two primary courses of action Alcoa has in accounting for the stock split, and how would the choice affect Alcoa's shareholders' equity? Hint: Think stock-split versus a large stock dividend.
  3. Access the FASB Accounting Standards Codification at the AAA website (see the syllabus). Identify and include the specific citation from the authoritative literature that describes how to account for treasury stock and stock-splits.

Note: Keep in mind that a well written memo should include an introductory paragraph that CLEARLY states the purpose of your memo to your boss. Avoid much writing here – be specific and to the point.

Discussion paragraph(s) that addresses the questions posed. Note that you can have several paragraphs as long as they address different major points.

Usually a memo has a conclusion/recommendation paragraph but since this assignment does not require one, you can leave that out but find a professional way to end your memo and not just leaving it hanging.

In: Accounting

Android Programming Create an app called GuessWho. The point of the app will to have the...

Android Programming


Create an app called GuessWho.

The point of the app will to have the user play a guessing game based on a displayed image.

The user will be greeted with a screen that has an image of a person, four buttons and a next button. The four buttons should each have a different name on it. One of the names will be the actual name of the person in the image.

Your guess who quiz should consist of at least 5 questions. Each question should have a unique image and a different correct answer.

The Model of the app should be a QuizQuestion. The QuizQuestion should have an image resource ID for the person being guessed, the strings for the four possible guesses and what the right answer is.

Your model should have appropriate constructor and get/set methods.

Your app should tell the user if they are correct if they press the button with the correct name, and your app should tell the user they are wrong if they tap the button of an incorrect name.

There should be a next button that takes the user to the next question of the quiz.

If the user completes the last question of the quiz, your app should Toast to the screen how many correct guesses they had and how many incorrect guesses they had.

If the user gets to the end of the quiz and presses next, they should go back to the first question after seeing the Toast.

For portrait orientation the image should appear first, then two guess buttons below the image, then two more guess buttons below the image, then the next button on the bottom of the screen.

For landscape orientation, the image should appear on the left side of the screen. To the right should be the 4 guess buttons. To the right of the buttons should be the next button.

(Feel free to use different layouts then these if you think they look better. The point is there should be a different landscape and portrait layout.)

The Controller Activity class should be a class called GuessWhoActivity. This should be the lone activity in your app responsible for handling user interaction and displaying questions and answers.

The view should be your .xml layout files.

The app should remember what question the user was on if they switch from landscape to portrait mode. (Example: If they were on the 3rd question in portrait mode and switch to landscape, they should still be on the 3rd question when they get to landscape mode).
Make sure to not be using hard coded strings. Use strings.xml.

In: Computer Science

Java. Given an input file with each line representing a record of data and the first...

Java. Given an input file with each line representing a record of data and the first token (word) being the key that the file is sorted on, we want to load it and output the line number and record for any duplicate keys we encounter. Remember we are assuming the file is sorted by the key and we want to output to the screen the records (and line numbers) with duplicate keys. We are given a text file and have to use the scanner class to lod it

Your task is to

  • create a FindDuplicates class with the following:

    • Declaration of an instance variables for the String filename

    • non-default Constructor - creates an object for user passed filename argument

    • Accessor methods return the value of each instance variable

    • Mutator methods that allows th user to set each instance variable (no validation required),

    • a "getDuplicates()" method that reads from the file (until end-of-file) using Scanner class, finds duplicate records based on the first token on each line (the key), and returns as a String the record number and entire duplicate record one to a line (see above Sample output)

      • toString() - returns a String message with the value of the instance variable

Sample Output

Enter File Name: input1.txt

FileName:input1.txt

DUPLICATES

12 102380 CS US W 2.8 3.267 125

14 102395 PPCI US W 2.769 2.5 115

25 102567 PPCI US W 3.192 3.412 112

35 102912 CS US Z 3.81 3.667 88

44 103087 CS US Z 2.956 2.688 90

76 103944 CS US W 3.134 3.294 134

77 103944 CS US W 3.698 3.7 94

86 104046 CS US W 2.863 3.133 65

88 104047 CS US W 3.523 3.524 77

89 104047 CS US O 3.825 3.824 49

91 104048 CS US W 3.071 3 94

92 104048 CS US W 3.114 3.111 44

93 104048 CS US W 3.375 3.6 71

Press any key to continue . . .

In: Computer Science

11.7: Customer Accounts Write a program that uses a structure to store the following data about...

11.7: Customer Accounts
Write a program that uses a structure to store the following data about a customer account:

     Customer name
     Customer address
     City
     State
     ZIP code
     Telephone
     Account balance
     Date of last payment

The program should use an array of at least 20 structures. It should let the user enter data into the array, change the contents of any element, and display all the data stored in the array. The program should have a menu-driven user interface.

Prompts And Output Labels. Your main menu should be the following:
     1. Enter new account information
     2. Change account information
     3. Display all account information
     4. Exit the program
The user is expected to enter 1 or 2 or 3 or 4.
The main menu is displayed at the start of the program and after the handling of choices 1, 2, and 3.

If 1 is entered for the main menu, the program prompts for each of the data listed above, in the order listed above, using the above data descriptions (e.g. "ZIP code") as prompts (followed in each case by a colon). After reading in and processing the data, the program prints
     You have entered information for customer number X
where X is the customer number: 0 for the first customer and increasing by 1 for each subsequent customer that is entered.

If 2 is entered for the main menu, the program prompts for the customer number:
     Customer number:
Upon entering a valid customer number the program displays all the data for the particular customer that has been saved:
     Customer name: ...
     Customer address: ...
     City: ...
     State: ...
     ZIP code: ...
     Telephone: ...
     Account balance: ...
     Date of last payment: ...

The program then skips one or two lines and prompts for a change, using the same prompts as in choice 1 above for all the data items associated with a customer.

If 3 is entered for the main menu, the program displays all the data for each customer that has been saved, using the display format in choice 2 above. After the display of each customer, the program prompts "Press enter to continue..." and waits for the user to hit return.

If 4 is entered for the main menu, the program terminates.

Input Validation (OPTIONAL). When the data for a new account is entered, be sure the user enters data for all the fields. No negative account balances should be entered.

In: Computer Science

Loss control activities of a business focus on finding and implementing solutions to reduce the probability...

Loss control activities of a business focus on finding and implementing solutions to reduce the probability of loss (loss prevention) and/or reduce the actual amount of loss (loss reduction), and therefore reduce the total cost of risk to maximize firm profitability.

Loss control techniques have been widely used in environmental loss prevention, catastrophic loss prevention, and employee-related risk management. Many firms face loss exposures caused by using, storing, and transporting hazardous materials, caustic substances, gasses, acids, etc., and may have unique issues posed by deployment of “greener” vehicle fleets using CNG, LNG, and bio-fuel solutions. Catastrophic risks, such as earthquakes, tornado, hurricanes or big fire, also pose significant threat to the property safety and business continuation for firms. Employee behavior-related risks and product safety are also important concern of corporate risk management.

Lack of effective loss control (such as inadequate systems, inadequate standards, and inadequate compliance with safety standards) may cause significant damage to a firm, such as injury costs, property damage, liability damage, bad press, lower sales, loss of employee morale, so on and so forth, as British Petroleum (BP) or Toyota had suffered in the past.

In this project, select an S&P 500 company and analyze its loss control policies focusing on either environmental loss prevention, or catastrophic loss prevention, or employee-related risk management.

Your analysis should address the following questions in the least:

  • How likely the firm is subject to catastrophic losses?
  • Has the business suffered losses of the kind in the past?
  • What losses could be caused to the firm if a catastrophic event occurs?

A. Direct Property Loss

B. Indirect (or consequential) Property Loss

C. Liability Loss

    D. Personnel Loss

     E. Crime

     F. Other Loss Exposures

  • What loss control activities has the firm implemented to reduce the loss?
    • E.g. For Property loss control, comment on Facility design and construction, Automatic Sprinkler Protection, Preventative maintenance, Equipment and Process controls and safeguards, Human Element programs, Pre-incident planning and Business continuity planning
    • Proactive Safety procedures vs. Reactive Safety & Recovery policies

In: Finance

c++ problem: Use an STL stack to reverse a line of input characters that are read...

c++ problem:

Use an STL stack to reverse a line of input characters that are read into a string. Your stack should contain the characters of the user's string. Use getline() for input – it needs to be part of your C++ tool inventory.

A note on getline: Suppose I am doing the following -

This program reverses a string using the STL stack

Enter your string of less than 80 characters followed by an ENTER

a string input

Enter another? 1 = continue. Anything else to stop

1

Enter your string of less than 80 characters followed by an ENTER

a second string

This code will not work by simply using the following loop:

       int go = 1;

       cout << "This program reverses a string using the STL stack" << endl;

       while(go == 1){

              cout << "Enter your string of less than 80 characters followed by an ENTER" << endl;

            char* s = (char *)malloc(80);

              cin.getline(s,81,'\n');

              cout << s << endl;

              cout << "Enter another? 1 = continue. Anything else to stop" << endl;

              cin >> go;

       }

Try it and see what happens! Also note that I never got rid of the memory I allocated with malloc – your code must get rid of it. Also, malloc outside the loop for more efficient code.

You must use a getchar() (part of the cstdio library) after cin >> go;

The reason is that when you enter 1 you also use the Enter key. This is still in the buffer when you hit getline again! So you will read in '\n'

Also note that when you get something off of the STL stack you must use .top() to look at it followed by .pop() to remove it.

Example:

This program reverses a string using the STL stack

Enter your string of less than 80 characters followed by an Enter

m&m cheeto mayo

oyam oteehc m&m

Enter another? 1 = continue. Anything else to stop

1

Enter your string of less than 80 characters followed by an Enter

celery lettuce apple

elppa ecuttel yrelec

Enter another? 1 = continue. Anything else to stop

0

Press any key to continue . . .

In: Computer Science

Project Risk Response Risk responses and action steps are defined during the risk response planning phase....

Project Risk Response

Risk responses and action steps are defined during the risk response planning phase. Here the project team must plan the actions that will be taken should any identified risk actually materialize. This is typically done for some subset of the total population of risk issues identified—most likely those that are of the highest probability and/or impact. Risks can be both negative (threats) and positive (opportunities). The possible strategies for responding to negative risks include the following: avoid, transfer, mitigate, and accept. The possible strategies for responding to positive risks include the following: exploit, enhance, share, and accept.

QUESTION

Based on the below risk register regarding the Pepsi Refresh Program

Summarize the approach for developing risk response strategies. For example, which risks should one first attempt to avoid? Should they do it based on the risk factor score (P*I) or EMV?

Describe the process to use to determine risk triggers (the event that tells someone that the risk event is imminent).

A

B

C

D

E

F

G

H

I

J

K

L

M

Risk No.

Risk Name

Risk Event Description

Risk Impact Description

Risk Type

Risk Source

Risk Trigger

Impact Score

1 to 5

Prob. Score

1 to 5

Risk Factor

P*I

EMV*

Response Type

Response

1

Sales Decline

Not having the direct brand tie-in to project decreased odds of driving sales

Brand declined to quantify the project's effect on sales

Financial

Project Success

0.8

5

4

$99,099

2

Internet

Disruption of Internet services prevents idea submissions and voting

Decreases the participation level engaged in the project

Operational

Technology

0.9

5

4.5

$25,000

3

Unsatisfied Vendors

Vendor(s) may not support ideas presented by participants

Loose vendor support

Reputation

Environment

1.0

2

2

4

Nonuser-friendly website

Target audience finds the website user interface confusing

If participants find it hard to interact with the website, they may go away and never try again

Operational

Technology

0.4

4

1.6

5

Participants being treated fairly

Organizations participating in project feeling that votes are not properly/fairly being collected

Being accused can cause claims fraud out of the contest

Compliance

Reputation

0.8

2

1.6

6

Project testing produce unsatisfied results

The board is not satisfied with the results after analyzing data from the 1-year pilot

The board decides to put a halt to the program

Strategic

Project Success

0.3

5

1.5

7

Participant Behavior

There is unwanted or inappropriate behavior on website that brings negative views about the project cause

Resulting in negative influences on potential grantees and/or interested voters to support the cause

Reputation

Environment

0.3

4

1.2

8

Insufficient Resources for traditional marketing

Printing advertisements can be very costly

Resulting in not having enough people to distribute this type of advertisement

Financial

Staffing

0.6

2

1.2

9

Scattered results

The program Supports numerous organizations across various issues/geographies so ideas are all over the place.

Makes it hard to concentrate on an impact of a specific issue

Strategic

Project Success/Reputation

0.3

2

0.6

In: Operations Management

Case study Rachael Tomkins is 55 years old and is a certified practising accountant. She works...

Case study

Rachael Tomkins is 55 years old and is a certified practising accountant. She works part time and lives with her husband Paul, aged 64 and daughter Marie, aged 17. Her grandmother Jean aged 90, lives in a small flat at the back of their house and her mother Mary, aged 72 lives in an Over 55s housing unit nearby. In her early 20s Rachael’s father, a Vietnam Veteran, committed suicide. Rachael is described by her family as reliable and caring. She has a small group of friends from her local parish church. Rachael has regular contact with her GP to manage her Diabetes Type 2. She is prescribed metformin and has been trying to lose weight. She also sees a psychiatrist Dr Lianne Yu for management of her symptoms of schizophrenia. She is prescribed Olanzapine and Lithium. She was diagnosed with schizophrenia in her early 20’s when she was studying at university. She was hospitalised with acute psychosis several times before her symptoms were stabilised. She was able to complete her university degree and has worked part time. The last time she experienced acute psychosis was 17 years ago, just after the birth of her daughter. Her symptoms stabilised, and she has been maintained in recovery for almost 15 years. This year has been a particularly challenging year for Rachael. Both her husband’s parents passed away within months of each other, her daughter commenced Year 12 and her grandmother had an infection in her middle toe, which resulted in a series of trips to the doctor, hospitalization and finally amputation of the affected toe. Rachael has become irritable with her family, and has developed erratic sleeping patterns, a lack of interest in grooming, and avoided social interactions with her friends or family. She complained to them that her neighbors were spying on her. In the 48 hours before she was admitted to hospital two incidents escalated Rachael’s need for professional help. In the first episode, she yelled and threatened the neighbor across the fence. She accused him of spying on her with a ‘trackamanometer’. Her husband intervened and took her back into the house. In the second incident later that day, Rachael started screaming at her family to evacuate the house because they would be bombed. Rachael insisted the newsreader on the TV was giving her this important information and they must all get out of the house. Rachael ran onto the road. A concerned neighbor called the police, who were able to convince her to accompany them to the hospital. She was met by her psychiatrist Dr. Yu who reports the following -Rachael is disheveled, dressed in a pajama top and track pants, no shoes, she has an exacerbation of auditory hallucinations, with persecutory delusions and disorganized thinking. Rachael agrees to be admitted because she says ‘I’m frightened’. Rachael is admitted for inpatient psychiatric care. Faculty of Health | School of Nursing, Midwifery & Paramedicine In the hospital, Rachael is argumentative and resistive to staff interactions and interventions, and her family are frightened and bewildered by her dramatic deterioration.

Q. Rachael will be admitted to the mental health inpatient unit. Write a nursing care plan based on the nursing diagnosis.

Q. What are the risk factors?  Does Racheal have any protective factors? If so, what are they?

can you please provide answer to these questions from the above case study.

thank you.....

In: Nursing

Please make sure that you respond to both passages and follow closely to the three questions...

Please make sure that you respond to both passages and follow closely to the three questions in the prompts (bullets). Do NOT do additional research on the topic. The purpose of the exercise is to analyze the existing passages; not to demonstrate additional research skills. You do not need to provide a Works Cited or Reference page. Note: there is no page limit, however, you need to sufficiently answer the prompts in essay format.

Holistic Assessment of Critical Thinking

Essay Directions:

Read the passages below and write an essay that addresses the following:

• What is the position in each passage?

• What evidence or reasons are given in support of each position?

• Which position is more convincing and why?

Do no additional research on the topics other than using a dictionary.

The Controversy: Does buying green products improve the environment?

Passage 1. Con: from “Buying Green Products Is an Inadequate Environmental Remedy” by Monica Hesse

"When wannabe environmentalists try to change purchasing habits without also altering their consumer mind-set, something gets lost in translation."

Buying green is a sign that people recognize the need to protect the environment, claims Monica Hesse in the following viewpoint. However, she argues, consuming green products is not the solution. Consumption will not solve the nation's environmental challenges, Hesse explains. To be truly green means to buy less, not green, she maintains. Replacing products thought to be environmentally unsound increases consumption, which in turn increases environmental problems, she reasons.

In satiric fashion, she admonishes the green consumer:

“Congregation of the Church of the Holy Organic, let us buy.”

“Let us buy Anna Sova Luxury Organics Turkish towels, 900 grams per square meter, $58 apiece. Let us buy the eco-friendly 600-thread-count bed sheets, milled in Switzerland with U.S. cotton, $570 for queen-size.”

“Let us purge our closets of those sinful synthetics, purify ourselves in the flame of the soy candle at the altar of the immaculate Earth Weave rug, and let us buy, buy, buy until we are whipped into a beatific froth of free-range fulfillment.”

“And let us never consider the other organic option—not buying—because the new green consumer wants to consume, to be more celadon than emerald, in the right color family but muted, without all the hand-me-down baby clothes and out-of-date carpet.”

Passage 2. Pro: from “Buying Green Products Will Improve the Environment” by Jenny Shank

"There's a certain thrill, that you get to go out and replace everything," says Leslie Garrett, author of "The Virtuous Consumer," a green shopping guide. "New bamboo T-shirts, new hemp curtains."

Garrett describes the conflicting feelings she and her husband experienced when trying to decide whether to toss an old living room sofa: "Our dog had chewed on it—there were only so many positions we could put it in" without the teeth marks showing. But it still fulfilled its basic role as a sofa: "We could still sit on it without falling through." They could still make do.

They could still, in this recession-wary economy, where everyone tries to cut back, subscribe to the crazy notion that conservation was about ... conserving. Says Garrett, "The greenest products are the ones you don't buy."

There are exceptions. "Certain environmental issues trump other issues," Garrett says. "Preserving fossil fuels is more critical than landfill issues." If your furnace or fridge is functioning but inefficient, you can replace it guilt-free.

Ultimately, Garrett and her husband did buy a new sofa (from Ikea—Garrett appreciated the company's ban on carcinogens). But they made the purchase only after finding another home for their old couch—a college student on Craigslist was happy to take it off their hands.

The sofa example is what Josh Dorfman, host of the Seattle radio show "The Lazy Environmentalist," considers to be a best-case scenario for the modern consumer. "Buying stuff is intrinsically wrapped up in our identities," Dorfman says. "You can't change that behavior. It's better to say, 'You're a crazy shopaholic. You're not going to stop being a crazy shopaholic. But if you're going to buy 50 pairs of jeans, buy them from this better place.'"

Then again, his show is called "The Lazy Environmentalist."

Source Citations

Hesse, Monica. "Buying Green Products Is an Inadequate Environmental Remedy." The Environment, edited by Louise I. Gerdes, Greenhaven Press, 2009. Opposing Viewpoints. Opposing Viewpoints in Context

Shank, Jenny. "Buying Green Products Will Improve the Environment." The Environment, edited by Louise I. Gerdes, Greenhaven Press, 2009. Opposing Viewpoints. Opposing Viewpoints in Context

In: Economics