Q2. Answer the following questions about the program.
|
Describe the purpose of the ports and pins being used in the above example. |
|
|
Describe the effect of changing PinPull_Up to PinPull_None |
|
|
Describe the effect of changing PinPull_Up to PinPull_Down |
|
|
Do we need PinDriveStrength_High? Carefully examine the LED board to help in answering this. |
|
|
Find where Led::setOutput() method is declared and determine the default parameters used if no actual parameters are specified. A little bit tricky! Hint: If you move the cursor to a method and then press F3 an editor window will open at the method declaration. |
|
|
Find where Switch::setInput() method is declared and determine the default parameters used if no actual parameters are specified. Also a little bit tricky! |
|
|
Find where GpioC<...> is declared and determine the default template parameters. Which defaults have been used in the example? |
THE CODE IS BELOW:
#include "hardware.h"
using namespace USBDM;
using Switch = GpioC<0, ActiveLow>;
using Led = GpioC<1, ActiveHigh>;
using RedLed = GpioC<3, ActiveLow>;
using BlueLed = GpioA<2, ActiveLow>;
int main() {
Led::setOutput(
PinDriveStrength_High,
PinDriveMode_PushPull,
PinSlewRate_Fast);
RedLed::setOutput(
PinDriveStrength_High,
PinDriveMode_PushPull,
PinSlewRate_Slow);
BlueLed::setOutput(
PinDriveStrength_High,
PinDriveMode_PushPull,
PinSlewRate_Slow);
Switch::setInput(
PinPull_Up,
PinAction_None,
PinFilter_None);
for(;;) {
bool switchValue = Switch::read();
console.write("Switch is ").writeln(switchValue);
Led::write(switchValue);
RedLed::write(!switchValue);
BlueLed::write(switchValue);
}
return 0;
}
In: Computer Science
In 1997, a disagreement arose between Livent Inc. and its auditor, Deloitte and Touche (Deloitte). Livent, which operated several theaters for live stage production, had sold the naming rights to one of its theaters to AT&T for $12.5 million. The agreement was oral, and one of the theaters was under construction. The auditors for Deloitte believed that only a portion of the deal should be included in revenue, but Livent wanted to book the entire $12.5 million. Livent retained Ernst & Young (EY) to provide an opinion on the transaction. EY’s report indicated that all $12.5 million could be recorded as revenue. Deloitte hired Price Waterhouse (currently PricewaterhouseCoopers) to review the transaction. Price Waterhouse agreed with EY and Livent, and Deloitte allowed Livent to book the $12.5 million. In 1998, Livent issued a series of press releases indicating the discovery of significant account irregularities and, later in 1998, Livent declared bankruptcy.
Required: Exhibiting professional competence and due professional care are part of the general standards set forth in the AICPA Code of Professional Conduct. Comment on the decision to engage public accounting firm competitors EY and Price Waterhouse concerning the disagreement over the accounting treatment of the $12.5 million transaction. Do you believe that hiring a competitor firm is sufficient to meet due professional care standard even though the company eventually declares bankruptcy?
In: Accounting
Please code in C#-Visual Studio
Tasks
Feedback rubric
|
Value |
Problem |
Points |
|
1 |
No comment header |
10 |
|
2 |
Variable type mismatch |
2 per variable |
|
3 |
Areas and perimeters do not match inputs |
20 |
|
4 |
Program crashes or does not compile |
20 |
|
5 |
No .cs file uploaded |
30 |
|
L |
Late |
20 |
In: Computer Science
Write a C++ program that asks the user to enter a series
of
single-digit numbers with nothing separating them. Read the
input
as a C-string or a string object. The program should display
the
sum of all the single-digit numbers in the string. For example,
if
the user enters 2514, the program should display 12, which is
the
sum of 2, 5, 1, and 4. The program should also display the
highest
and lowest digits in the string.
It is recommended that you include a function such as int charToInt(char)
The charToInt function
accepts a char and returns the char's value as an integer digit.
If
the char is not a digit, the function returns 0.
Remember to use proper formatting and code documentation.
Sample screen output (user input is in bold) :
Enter a series of digits with no spaces between them. 1 2 3 4 5 Incorrect input....? Enter a series of digits with no spaces between them. 1234 4321 Incorrect input....? Enter a series of digits with no spaces between them. 1234 srjc Incorrect input....? Enter a series of digits with no spaces between them. srjc 1234 Incorrect input....? Enter a series of digits with no spaces between them. 987654321 The sum of those digits is 45 The highest digit is 9 The lowest digit is 1 Process returned 0 (0x0) execution time : 71.074 s Press any key to continue.
In: Computer Science
Our class is a team of young lawyers, project managers, engineers, and congressional aides who are all part of the process of helping get this project off the ground. In fact, according to the first letter of your last name, you are the following team: 0-S: Engineer on the GFC team
Somebody sent a secret copy of the report to you at your home address. It has no information in it at all, except for the report showing the proof of the increase in accidents and deaths. The report shows, on its face, that the CE, CLC, CPM, and your Congressional Representative have seen copies of this report. On the front there are these words typed in red: They knew — they buried this. Please save the world! Each of you feel a very loyal tie to your boss and your company/country. You all have mortgages, and families to feed. It is likely if you blow the whistle on this report, you will lose your job and your livelihood. You're not even sure who wrote the study in your envelope or who actually sent it to you. Initial Post Instructions For the initial post, address all of the following: Utilizing your profession's code of ethics, what would be your first step? Who would you talk to first? Would you go to the press? Would you go to your boss? Should you do anything at all?
In: Psychology
HW_6d - Write a struct object to a binary file.
binary file named: critters.bin
each cat.
Record written to file. (see output)
/* OUTPUT
Enter 3 cat records.
Enter information about a cat:
NAME: Tom
AGE: 5
Enter information about a cat:
NAME: Fluffy
AGE: 3
Enter information about a cat:
NAME: Sweet Pea
AGE: 2
Record written to file.
Press any key to continue . . . */
Please make the code based on C++, and make a description for each code.
In: Computer Science
Discuss how you would expect the financing choices of the
following firms to differ and explain the reasons for the
differences. (Include international and Caribbean examples where
possible) ( for example internal or external, traditional non
traditional, bank loan angel investors, personal saving etc)
i. A venture that is considered a family firm, compared to a
non-family firm.
ii. A venture that belongs to the food industry that is a sole
trading firm, compared to a partnership firm.
iii. An early-stage research and development venture, compared to
an established venture that is generating revenue.
iv. A venture with revenues that are growing very rapidly and must
expand its working capital base to match, compared to a venture
with revenues that are growing at the inflation rate.
v. A venture that is highly profitable and growing, compared to a
venture that is growing at a similar rate but has not yet achieved
profitability.
vi. A venture that is being undertaken by an entrepreneur who has a
significant track record of new venture successes, compared to a
venture that is being undertaken by an entrepreneur with no
previous new venture experience.
Source: Smith, J., Smith, R. L., Smith, R., & Bliss, R. (2011).
Entrepreneurial finance: strategy, valuation, and deal structure.
Stanford University Press.
This essay must be between 1500 to 2000 words. The paper should
consist of an introduction, body, and conclusion, be doubled-spaced
and follow APA 6th edition referencing style.
In: Finance
In 1997, a disagreement arose between Livent Inc. and
its auditor, Deloitte and Touche (Deloitte). Livent, which operated
several theaters for live stage production, had sold the naming
rights to one of its theaters to AT&T for $12.5 million. The
agreement was oral, and one of the theaters was under construction.
The auditors for Deloitte believed that only a portion of the deal
should be included in revenue, but Livent wanted to book the entire
$12.5 million. Livent retained Ernst & Young (EY) to provide an
opinion on the transaction. EYs report indicated that all $12.5
million could be recorded as revenue. Deloitte hired Price
Waterhouse (currently PricewaterhouseCoopers) to review the
transaction. Price Waterhouse agreed with EY and Livent, and
Deloitte allowed Livent to book the $12.5 million. In 1998, Livent
issued a series of press releases indicating the discovery of
significant account irregularities and, later in 1998, Livent
declared bankruptcy.
Required:
Exhibiting professional competence and due
professional care are part of the general standards set forth in
the AICPA Code of Professional Conduct. Comment on the decision to
engage public accounting firm competitors EY and Price Waterhouse
concerning the disagreement over the accounting treatment of the
$12.5 million transaction. Do you believe that hiring a competitor
firm is sufficient to meet due professional care standard even
though the company eventually declares bankruptcy?
In: Accounting
There are at least five (probably more) places in the attached C# program code that could be optimized. Find at least five things in the Program.cs file that can be changed to make the program as efficient as possible.
using System;
namespace COMS_340_L4A
{
class Program
{
static void Main(string[] args)
{
Console.Write("How many doughnuts do you need for the first
convention? ");
int.TryParse(Console.ReadLine(), out int total1);
Console.Write("How many doughnuts do you need for the second
convention? ");
int.TryParse(Console.ReadLine(), out int total2);
int totalDonuts = Calculator.CalculateSum(new int[] { total1, total2 });
Console.WriteLine($"{ totalDonuts } doughnuts is {
Calculator.ConvertToDozen(totalDonuts)} dozen.");
Console.WriteLine("Press Enter to quit...");
Console.ReadLine();
}
}
static class Calculator
{
static int DOZEN = 12;
public static int CalculateSum(int[] args)
{
int return_value = 0;
foreach (int i in args)
{
return_value += i;
}
return return_value;
}
public static int ConvertToDozen(int total)
{
int dozen = DOZEN;
return total / dozen;
}
}
}
In: Computer Science
Response 3 and Response 4 are different so please leave a space or big area between both answers thank you
Response 3:
Questions
What are some things that you believe should be private? List at least three and briefly explain why for each item. Also for each, do you think that technology increases or decreases privacy? Briefly discuss how it does so for each item.
How important is privacy? Is it as important as freedom of speech, freedom of the press, freedom of assembly, etc? Why or why not?
Should privacy be protected? Why or why not? Who should be responsible for providing protection for privacy?
Response 4
Questions
Do the same standards apply to us? You probably have an address book database containing addresses, phone numbers, and perhaps birthdays of your friends.
What restrictions do you think there should be on how you collect and use such information? Should you need permission for each use? Should you provide an opt-in or opt-out choice for the people in your address book? Should you be required to remove anyone who asks to be removed? How reasonable are these requirements for individuals?
So there should be two different responses please lable them response 3 & 4 and leave space between. This is computer digital ethics class
In: Computer Science