Assignment anthropocentrism, global warming, consumerism-WORTH 15%
North American culture supports excessive consumerism;āconsumerism has encouraged people to seek happiness through constant expansion of their material standard of livingā (Bush, 2008). Adam Smith is arguably the most influential economist of all time. He wrote extensively on capitalism, and he said āconsumption is the sole end and purpose of all production; and the interest of the producer ought to be attended to only so far as it may be necessary for promoting that of the consumerā (Smith, 1776).
Part 1
Please consider the lecture notes and videos when answering the following questions. BE sure to answer in full sentences and paragraph formation. Donāt assume I have read the question.
Part 2: The effects of Global Warming on human life.
The World Health Organisation (2017) found that āBetween 2030 and 2050, climate change is expected to cause approximately 250,000 additional deaths per year, from malnutrition, malaria, diarrhea and heat stress.ā
Be sure to watch the Panopto video āIntroduction to Argumentsā prior to answering the following questions.
Part 3
Part 4- reflection
In: Economics
| Series Legend | Input Area | Net Sales | CE | OR | TB | ||||||||||||||||||||||||||||||||
| Royalty Rate: | 7.3% | Average | Certification Series | Office Reference | True Beginner | ||||||||||||||||||||||||||||||||
| Return Rate: | 10.0% | Highest | |||||||||||||||||||||||||||||||||||
| Bonus Amount: | $500.00 | Lowest | |||||||||||||||||||||||||||||||||||
| Author | Series Code | Software | Quantity Sold | No. Books Returned | Percent Returned | Unit Price | Net Sales | Author Royalties | Bonus | Author Earnings | |||||||||||||||||||||||||||
| Lopez | OR | Word 2016 | 8,584 | 500 | $49.95 | 500 | |||||||||||||||||||||||||||||||
| Krupin | TB | Word 2016 | 1,847 | 271 | $25.00 | 500 | |||||||||||||||||||||||||||||||
| Cote | CE | Word 2016 | 2,684 | 400 | $39.95 | 500 | |||||||||||||||||||||||||||||||
| Yeung | OR | Excel 2016 | 11,841 | 1,042 | $49.95 | 500 | |||||||||||||||||||||||||||||||
| Tremblay | TB | Excel 2016 | 9,475 | 957 | $30.00 | 500 | |||||||||||||||||||||||||||||||
| Torres | CE | Excel 2016 | 8,443 | 327 | $39.95 | 500 | |||||||||||||||||||||||||||||||
| Martin | OR | Access 2016 | 8,064 | 834 | $49.95 | 500 | |||||||||||||||||||||||||||||||
| Alfero | TB | Access 2016 | 3,397 | 331 | $30.00 | 500 | |||||||||||||||||||||||||||||||
| Daniels | CE | Access 2016 | 3,978 | 415 | $34.49 | 500 | |||||||||||||||||||||||||||||||
| Ortiz | OR | PowerPoint 2016 | 1,279 | 120 | $49.95 | 500 | |||||||||||||||||||||||||||||||
| Wong | TB | PowerPoint 2016 | 1,050 | 184 | $25.00 | 500 | |||||||||||||||||||||||||||||||
| Kumar | CE | PowerPoint 2016 | 2,507 | 187 | $34.49 | 500 | |||||||||||||||||||||||||||||||
| Bartalotti | TB | Outlook 2016 | 1,884 | 175 | $25.00 | 500 | |||||||||||||||||||||||||||||||
| Wallace | OR | Windows 10 | 14,750 | 1,839 | $49.95 | 500 | |||||||||||||||||||||||||||||||
| Toulou | TB | Windows 10 | 8,342 | 803 | $25.00 | 500 | |||||||||||||||||||||||||||||||
| Coleman | CE | Windows 10 | 6,124 | 741 | $34.49 | 500 | |||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||
In: Operations Management
Program Requirements
Program Output
Your output should look like this:
| Line 8: using(0) namespace(6) <== using
occurs at position 0 on line 8, namespace occurs at position 6 on
line 8 Line 10: const(0) int(6) Line 12: void(0) const(19) Line 13: void(0) char(20) int(32) const(48) Line 14: bool(0) const(24) char(30) const(42) Line 15: void(0) char(17) Line 16: void(0) Line 17: void(0) Line 19: int(0) Line 21: const(4) ... Number of keywords found = ?? <== Add this line at the end of your output, replace ?? with the correct number |
Program Hints
The keyword file looks like this:
| for if nullptr break int long sizeof return short else friend const static_cast ... |
The C++ program file looks like this:
| #include <cstdlib> #include <cstring> #include <cctype> #include <cmath> #include <fstream> #include <iostream> #include <string> using namespace std; const int DictionarySize = 23907; void getDictionary(const string& filename,string*); void spellCheckLine(char* line, int lineNumber, const string* dictionary); bool wordIsInDictionary(const char* word, const string* dictionary); void toLowerCase(char* text); ... |
istream::getline example
| ifstream fin("oldass3.cpp"); ... char buffer[132]; ... fin.getline(buffer,sizeof(buffer)); // store a line from the input file into buffer |
In: Computer Science
Step 1: Your program will now take its input from this file instead of from the user. Here's what you want to do:
Run your code to make sure that the file is opened and read correctly. Hint: you may test the correctness of code by printing the contents of this file, one string at a time.
//Code to be adjusted
#include<iostream>
#include<string>
using namespace std;
//prompts user for input and returns a string containing userinput
string getUserInput(){
string input;
getline(cin,input);
return input;
}
//returns true if given character is vowel else false
bool isVowel(char c){
if(c=='a'||c=='e'||c=='i'||c=='o'||c=='u'||c=='A'||c=='E'||c=='I'||c=='O'||c=='U')
return true;
return false;
}
//returns true if given character is an alphabet else false
bool isAlphabet(char c){
if((c >= 'a' && c<='z') || (c >= 'A' && c<='Z'))
return true;
return false;
}
//returns true if given character is digit else false
bool isNumber(char c){
if(c >= '0' && c <= '9')
return true;
return false;
}
//Prints the report
void printReport(int vowels, int cons, int digit, int special){
cout<<"Vowels: "<<vowels<<endl;
cout<<"Consonants: "<<cons<<endl;
cout<<"Digits: "<<digit<<endl;
cout<<"Special characters: "<<special<<endl;
}
//driver function
int main(){
//to store user string
string input;
//counters for number of vowels, consonants, digits and special characters respectively
int vowel = 0;
int consonant = 0;
int digit = 0;
int specialChar = 0;
//gets user input
input = getUserInput();
//iterating over input and counting the number of vowels, consonants, digits and special characters
for (int i=0;i<input.length();i++){
if(isVowel(input[i])){
vowel++;
}
else if (isAlphabet(input[i])){
consonant++;
}
else if(isNumber(input[i])){
digit++;
}
else{
specialChar++;
}
}
//Displaying the report
printReport(vowel,consonant,digit,specialChar);
return 0;
}
Ex: If the input file is:
Input
words.txt
Your output (end the following message with a newline)
Could not open file words.txt
Step 2:
void printReport(string userText, int vowelCount, int consoCount, int digitCount, int specialCount)
{
//implement the three rules of checking if the input word is a valid C++ variable or not
//you may copy the code below in your printReport() function
if (isValid) {
cout << "The variable name - " << userText << " - is valid." << endl;
}
else {
cout << "The variable name - " << userText << " - is invalid." << endl;
}
}
You must print the message in printReport() for each word in the input file (words.txt).
At this moment, your main() is going to have code that opens and reads contents of a file, does counting (vowels, consonants, digits, and special characters) and calls printReport(). Go ahead and run it to make sure that your code gives the correct output for a test string.
Step 3: Build a function called getCount() that takes a string parameter (for the inputText that is being analyzed) and four additional parameters corresponding to the count of each kind of character. These would be passed by reference and their value will be set by this function.
Prototype: void getCount(string userText, int& vowelCount, int& consoCount, int& digitCount, int& specialCount);.
Refactor your main() so that it only calls getCount and printReport by passing it appropriate arguments. At this stage, your main() should have code that opens and reads from a file and calls getCount() and printReport() for each word read from the input file. Run your code to make sure it works and gives the correct output for a test string.
getCount() function that does all the counting so as to reduce the code inside main() even further!
Text files:
data1.txt
Ihaveadream
Elponitnatsnoc
yellowtiger
x
cat?dog
star!search
Gameover!
data2.txt
This
file
contains
15
words
It
has
lots
of
letters
and
very
few
special
characters!
Fallis@wesomein$onomaCounty!
In: Computer Science
Homework # 3: Note: Please circle your answers when appropriate! 1) You have a sample of 11 flowers from pea plants. (a) Suppose 7 of them are white, and 4 of them are purple. If you line them up in a row, how many different arrangements can you get? Note: WWWWWWWPPPP is one arrangement, WPWPWPWPWWW is another arrangement, and so on. You do NOT want to actually list all possible arrangements - instead, use what you learned in class to calculate this. (b) Now suppose 4 of them are white and 7 of them are purple. How many different arrangements can you get? (c) How many arrangements do you have for 1 white and 10 purple? (d) How many arrangements do you have for 0 white and 11 purple? 2) In the U.S., about 8.5% of people are B+ for blood type. You take a sample of size 9. You're interested in people who are B+. Figure out the following probabilities: a) Pr{Y = 3} b) Pr{Y = 1} c) Pr{Y < 1} d) Pr{Y > 0} (hint - use (c) to answer this and make sure you know why this works) 3) Mendelian genetics predict that in Labrador retrievers (a type of dog), 75% should have black coat color if both parents are heterozygous (the rest are brown). You mate two parents and get a litter of 6 puppies. Calculate the following: a) The probability of 4 black puppies. b) The probability of 4 brown puppies. c) The probability that 50% of the puppies will be brown. (Comment: You do not need to know anything about genetics to solve this problem. If you're trying to do things like use punnet squares, you're doing things wrong) 4) Refer to problem 3. Calculate the probability of every possible outcome (hint: you need to make seven calculations (you already made three of them in problem 3)). 5) Let's do some R.... Suppose you have the following situation: You have a large jar of beans, 29% black, 71% white. You take a sample of 11 beans. a) Use R to figure out the probability for every single possible outcome. In other words, you need to calculate: Pr{0 black beans in 11 trials} Pr{1 black bean in 11 trials} . . etc. . Pr{11 black beans in 11 trials} b) Once you have this information, you need to plot a barplot that shows you what this distribution looks like. As you might guess, you'll need to use the binomial (in R - see below) to solve this problem. Make sure you present all your results (you should have a list of probabilities and the barplot). _________________________________________________________________________________________ Some R instructions to help you are on the next page. Instructions for copying graphs in/from R are also included at the end. For R problems: be prepared to sketch or list your results. You may be asked to show graphs to the class using the document camera at the front of the room (your recitation instructor will set this up for you). Note the following: NEVER, NEVER, hand in just an R printout: Clean it up and clearly label your answers. Make it obvious where everything is and what/where your conclusions/answers are. You will not do well if all you do is hand in a printout. Due in recitation the week of February 17th . R commands: Caution: Be careful copying and pasting commands into R. Some characters may not copy correctly and give you error messages. This is particularly true for quotes. R does not recognize quotes that look like ā, only quotes that are straight like this: " . I tried to fix this below, but canāt guarantee I caught everything. Bean problem: Here's an example using a sample of 8 beans from a jar with 32% black beans. You should be able to modify the following as needed to answer question 6: For probabilities: You want probabilities for 0 through 8 beans. First we need to create y with 8 numbers: y <- c(0:8) This command says to give āyā the numbers 0 - 8 in sequence; technically ā0:8ā tells R it's a sequence of numbers, and the ācā out front means to combine all the numbers. The ācā isn't really needed (try it!) this time, but it is required in many similar situations so it's a good habit to get into to. Now we just āfeedā our y into the binomial function to get our answers: p <- dbinom( y, size = 8, prob = .32) This should give you āpā with all the binomial probabilities (they'll be in order from 0 to 8; type āpā to get/see the probabilities) If you want to make it look nice, you can do: pr <- data.frame(y,p) pr to make it look even better, follow this with: print(pr,row.names = FALSE) The data.frame command combines the variables you list (in this case, y and p) into a single data set. Unfortunately if you then type āprā R will insist on printing row names as well. If you want to get rid of the row names (theyāre not needed), you need to use the print statement as given above. To get a barplot: To get a barplot, you simply do (see also the homework instructions from last week): barplot(p) This won't look very nice, so you should try to improve it: barplot(p,names.arg = y) Here ānames.argā is the variable that holds the labels you want to put on the x axis (remember we put the numbers 0 - 8 into y). Just try it - you'll see how it works. If you want to improve your graph even more, you can do (review the caution statement above if you have trouble copying and pasting this): barplot(p,names.arg = y, ylab = "frequency", xlab = "number of dark beans") Or even fancier: barplot(p,names.arg = y, ylab = "frequency", xlab = "number of dark beans", col = "blue") To copy/save graphs generated in R or RStudio: You're going to want to save your graphs or copy them into a word processor so that you can hand them in or refer to them during presentations. If you are using RStudio: (If you're given a choice of format to use as you follow these instructions (usually under Windows), choose āmetafileā) Make sure the graph you want is visible in the graphics window. Click on āexportā near the top of the plot window. Select āCopy Plot to Clipboardā The click on āCopy Plotā Open your favorite word processor and paste the graph into your document. Comment: copying graphs this way doesn't always give you the best looking graphs (particularly if you're using Linux). Saving the plot as a high resolution image and then inserting this into your document often gives better results. The details on how to do this are provided below - the following instructions work both with and without Rstudio. If for some strange reason you're not using RStudio or you want to do this just from the command line: Windows: In R, right click the graph, select ācopy as metafileā (don't use bitmap), then open your favorite word processor and paste the graph. Mac OS: You should be able to copy the graph (make sure the graph window is active) from the menu, and then simply paste the graph into Word (or whatever word processor you use). If this doesn't work for some reason, the Linux instructions will work (they'll work with Windows as well). Linux: This is a bit complicated. A simple way to do it is to use the print screen key, but it'll look horrible. Hereās one example of getting good looking graphs: 1) generate the graph on-screen (just as usual) to make sure it looks right. 2) type ājpeg()ā in the command line. There are actually several formats you can pick but jpeg is probably the easiest. 3) generate the graph again (make the graph again). You'll notice that nothing seems to happen. That's okay. It's writing the graph to a jpeg file. 4) now type ādev.off()ā on the command line. 5) the graphics file should now be in your home directory. It'll have a name like āRplotxxx.jpegā, where xxx is some number. You can always sort by modification date in your file browser to find it quickly. 6) You should now be able to insert or copy the file into your text document (e.g. Word, LibreOffice, or whatever you're using). 7) The jpeg may not look terrific (it'll look a lot better than āprint-screenā. You can increase the resolution by doing (in step 2 above)): jpeg(width = 1000,height = 1000) The jpeg command defaults 480 x 480, which isn't that great. You can also use the jpeg command to give it a filename that makes sense, if you want: jpeg(filename = "your-file-name",width = xxx, height = xxx)
In: Statistics and Probability
Describe strategies for safe, effective multidimensional nursing care for clients with acid-base imbalances.
Scenario
Tony is a 56-year-old, Hispanic male that presented to the Emergency Room with complaints of shortness of breath, which he has been experiencing for the past two days. He states āI havenāt felt good for about a week, but couldnāt afford to miss work.ā He complains of a cough, fever, and feeling exhausted. Past medical history includes asthma, chronic obstructive pulmonary disease and diabetes. Upon physical examination, you notice that Tony is struggling to breathe, his respiratory rate is 36 breaths per minute and labored, heart rate 115 beats per minute, blood pressure 90/40 mm Hg, and his pulse oximetry is 84% on room air. You notify the MD. He orders oxygen at 4 L via NC and an arterial blood gas.
Tonyās ABG results:
pH 7.28
PaCO2 ā 55 mm Hg
PaO2 ā 70 mm Hg
HCO3 ā 30 mEq/L
Instructions
In a 1-2 page Word document:
In: Nursing
ABC Ltd has accounts receivable of $99 600 at 30 April, 2019. An analysis of the accounts shows these amounts as follows:
Month of sale | Balance of Accounts Receivable | |
April, 2019 | $50 000 | |
March, 2019 | 43 000 | |
February, 2019 | 1 200 | |
January, 2019 | 5 100 | |
December and November, 2018 | 300 | |
99 600 | ||
Credit terms are 2/7, n/30. At 30 April, 2019, there is a $2000 credit balance in Allowance for Doubtful Debts before adjustment. The entity uses the ageing of accounts receivable basis for estimating uncollectable accounts. Estimates of bad debts are as follows:
Age of accounts | Estimated percentage uncollectable | ||
Current | 2% | ||
1-30 days past due | 5% | ||
31-90 days past due | 40% | ||
over 90 days | 50% | ||
Required:
a) Determine the total estimated uncollectable (1 mark)
b) Prepare the adjusting entry at 30 April, 2019 to record bad debts expense (1 mark)
c) In May, 2019, a cheque for $1500 is received from the customer whose account was written off as uncollectable in February. Prepare the journal entry. (2 marks)
(Both account names and figures should be correct in order to
award marks.
Type your response directly into the text box below. Alternatively, you may draft your response in Excel or Word and upload as an attachment into the Files section underneath.)
In: Accounting
As the senior accountant at Technology on Demand (TOD), which manufactures mobile technology such as flip phones, smartphones, notebooks, and smartwatches, you are often asked to prepare various financial analysis necessary for decision making. Michelle Dodd, the controller, asked you to evaluate whether a piece of factory equipment should be replaced or kept.
The old piece of factory equipment was purchased four years ago for $875,000. Over the last four years, TOD has allocated depreciation based on the straight-line method. The expected salvage value is $25,000. The current book value of the factory equipment is $425,000. The operating expenses total approximately $45,000 a year. It is estimated that the residual value (market value) of the old machine is $350,000.
The controller is contemplating whether to replace the piece of factory equipment. The replacement factory equipment would consist of a purchase price of $500,000, a useful life of eight years, salvage value of 30,000, and annual operating costs of $35,000.
In consideration of the background, prepare a memo in a Word document to submit to the controller. Your first paragraph would be an introduction paragraph of what the memo is about. Next, you will want to consider the equipment replacement decision. To add clarity to your discussion, you are to insert a table comparing the old equipment to the new equipment. In evaluating the ārelevantā costs, what does your analysis show? Do you recommend that the equipment be replaced or kept ongoing for the next eight years? Why or why not?
In: Accounting
Write a C++ program to create a text file. Your file should contain the following text:
Batch files are text files created by programmer.
The file is written in notepad.
Creating a text file and writing to it by using fstream: to write to a file, you need to open thew file as write mode. To do so, include a header filr to your program. Create an object of type fsrteam. Open the file as write mode.
Reading from a text file using fstream object: Besides including the fsrteam header file to your program, there are three points to remember to read from a batch file. First, to make sure there exists a file. Second, make sure the existing file is not emty. Third, open the file as a read mode.
To append text to the existing file: open and existing file as append mode which will append new information at the end of the file if the file is not emty.
Binary files: binary files are readable only by the compiler. A user would not be able to read a binary file.
Your program should read the text file and create the following output:
1. Find the number of words in each line and display it.
2. Find the number of lines and display it.
3. Find the total number of words in the file and display it.
4. Find the number of words that start with capital letters on each line and display it.
5. Find how many time word "file/files" are represented and display it.
In: Computer Science
Business Scenario from Textbook BUSN11:
In the nation where Klaus lives, there are four very large manufacturers of furniture. Klaus and some very wealthy friends want to establish Number Five in the furniture manufacturing industry. Their strategy is quite simple and straight forward. They will quickly establish their new firm in the market and will sell all their products at lower prices than currently exist in the market. "We can have our company up and running within six months," Klaus confidently tells one of the prospective investors. An advisor says to Klaus: "These friends who want to back you financially, are they millionaires?" Klaus answers, "Not necessarily. They're just sharp business people who want to get a new firm started in an industry that is looking for some new ideas, some new blood." Soon the word has spread throughout the furniture industry that Klaus and friends are about to make a move. Then, Klaus gets a phone call: "Klaus, this is Ted Willkur of Willkur Furniture, and I'd like for you and me and some of my furniture colleagues from the other firms to have lunch together out at the country club. Interested?
Question: After considering some of the barriers of international trade, choose one and give an example that has existed or exists in the "real world". Explain your answer. There are many examples that can be found on the news, on the internet, etc. Do not use any of the examples given in your textbook.
In: Economics