how do corporations benefit from government regulation?
*refer to Dean Baker's THE CONSERVATIVE NANNY STATE*
In: Economics
##Notice: write in HLA code
.
.
Create an HLA Assembly language program that prompts for a single integer value from the user and prints an boxy pattern like the one shown below. If the number is negative, don't print anything at all.
.
Here are some example program dialogues to guide your efforts:
.
Feed Me: 5
55555
5 5
5 5
5 5
55555
Feed Me: -6
Feed Me: 3
333
3 3
333
.
In an effort to help you focus on building an Assembly program, I’d like to offer you the following C statements matches the program specifications stated above. If you like, use them as the basis for building your Assembly program.
.
SAMPLE C CODE:
------------------------
int i, n, j;
printf( "Feed Me:" );
scanf( "%d", &n );
for (i=1; i<=n; i++) {
if (i == 1 || i == n) { // first or last row
for (j = 1; j <= n; j++) {
printf( "%d", n );
}
printf( "\n" );
}
else { // internal rows of the box
printf( "%d", n );
for (j = 1; j <= n-2; j++) {
printf( " " );
}
printf( "%d", n );
printf( "\n" );
}
}
.
##Answer the questinon in HLA Assembly language program.
In: Computer Science
The water used in this experiment is sparged with nitrogen to remove any dissolved oxygen. The proton-coupled reduction of oxygen is shown in the following half reaction:
O2 + 4H+ +4e- --> 2H2O
1) Explain why sparging a solution with N2 to remove dissolved oxygen is an equilibrium process.
2) Using the half reaction above, write the balanced equation for the reaction of ascorbic acid with oxygen. Show your work.
3) If you didn’t know whether or not O2 is capable of oxidizing ascorbic acid, how would you determine this by consulting data? What data would you consult and what would you look for?
In: Chemistry
Topic: Schizophrenia
1. Review the readings on schizophrenia, DSM-V criteria and briefly describe schizophrenia, and current understanding of the disorder.
2. Conduct a literature search and address one of the following questions in a brief essay:
a) What is the relationship (if any) between violence and schizophrenia?
b) What role, if any, does stigma play in help seeking, treatment, and recovery?
In: Psychology
In: Physics
In the previous question, you designed a simple algorithm to
create a class list application. In this question, you
will implement the same application in Java. To do this, you will
need a working version of a Student ADT, a List
ADT, and the List Iterator. You may start with your own Student
ADT, or you can start from the solutions to
Assignment 2. You will be given a working version of a List
ADT.
Recall that your application does the following:
• Create a class list of students
• Display every Student record in the class list to the
console.
• Give every student a bonus mark on the final exam. It does not
matter how much of a bonus you give.
• Display every Student record in the class list to the console, to
show the changes to the records.
You must store Student objects in a List, using the given List
ADT.
You are to use the List Iterator for any task that requires looking
at every element in a list (the last two items
above).
Here’s a guide for you to help you manage this task.
1. Download the BasicLinkedList.java and List.java files from
Moodle.
2. Obtain the StudentADT.java and Student.java files from either
your solution or the model solution of assignment
3. Create a new application class called ClassListApp.java, that
contains a main method. Make sure that you
include import java.util.*; on the top of the file.
4. Take your design for Exercise 1, and copy it into
ClassListApp.java, as comments. Implement the design in
steps (not all at once). Every time you have a step implemented,
compile and test.
Here are the java source file already given
List.java
import java.util.Iterator;
/**
* Defines the interface to a list collection.
* The implementation of the list is hidden.
*
*/
public interface List<E> extends Iterable<E>
{
/**
Pre:
Post: the list is unchanged.
* Return: true if this list contains no elements; false
otherwise
*/
public boolean isEmpty();
/**
Pre:
Post: the list is unchanged.
* Return: the number of elements in this list.
*/
public int size();
/**
* Check if an element exists in the list
Pre:
Post: the list is unchanged.
Return: true if the specified element is found in this list
and
false otherwise. Throws an EmptyCollectionException if the
list
is empty.
*/
public boolean contains (E targetElement);
/**
Deletes the first element in this list and returns a
reference
to it. Throws an EmptyCollectionException if the list is
empty.
Pre:
Post: the first element is removed from the list
Return: a reference to the removed element
*/
public E deleteHead();
/**
Removes the last element in this list and returns a reference
to it. Throws an EmptyCollectionException if the list is
empty.
Pre:
Post: the last element is removed from the list
Return: a reference to the removed element
*/
public E deleteTail();
/**
Removes the first instance of the specified element from this
list and returns a reference to it. Throws an
EmptyCollectionException
if the list is empty. Throws a ElementNotFoundException if
the
specified element is not found in the list.
Pre: targetElement :: E, the target element to be removed
Post: the element is removed from the list
Return: a reference to the removed element
*/
public E deleteElement(E targetElement);
/**
Insert a new node to the head of the list.
Pre: item :: E, content in the new node
Post: new node is inserted to the head of the list
Return: nothing
*/
public void insertHead(E item);
/**
Insert a new node to the end of the list.
Pre: item :: E, content in the new node
Post: new node is inserted to the end of the list
Return: nothing
*/
public void insertTail(E item);
/**
Insert a new node at a specific position in the list.
Pre: item :: E, content in the new node
position :: the position of the new node
Post: new node is inserted at position in the list
Return: nothing
*/
public void insertAtPosition (E item, int position);
/**
Retrive the element at a specific position in the list.
Pre: position :: Integer, a position in the list
Post: the list is unchanged
Return: the element at the position
*/
public E get(int position);
/**
* Useful method for pretty print for atomic data
Pre:
Post: the list is unchanged.
Return: Returns a string representation of this list.
*/
public String toString();
/**
* Returns an iterator for the elements in this list.
*
* @return an iterator over the elements in this list
*/
public Iterator<E> iterator();
}
Student.java
/**
* Defines the interface to the student ADT.
*
*/
public interface Student {
/**
displayStudentRecord()
Pre:
Post: displays Student info
Return: nothing
*/
public void displayStudentRecord();
/**
Algorithm changeAssignmentGradeForStudent(asnNum,grade)
Pre: asnNum :: Integer, the index of the assignment to grade
grade :: double, the amount to change the grade
Post: If the index is sensible, the appropriate grade is
changed
(this method allows grades to be changed arbitrarily)
Return: true if the change was made, false otherwise
*/
public boolean changeAssignmentGradeForStudent (int asnNum, double
grade);
/**
Algorithm changeExamGradeForStudent(grade)
Pre: grade :: double, the amount to change the grade
Post: the exam grade is changed
(this method allows grades to be changed arbitrarily)
Return: nothing
*/
public void changeExamGradeForStudent(double grade);
}
StudentADT.java
public class StudentADT implements Student {
private String firstName;
private String lastName;
private int stNum;
private double [] agrades;
private double egrade;
/**
Algorithm StudentADT(firstNm, lastNm, stNo, asn1Grade, asn2Grade,
asn3Grade, examGrade)
Constructor to create a student object
Pre: firstNm, lastNm :: String
stNo :: integer
asn1Grade, asn2Grade, asn3Grade :: double
examGrade :: double
Post: allocates memory on the heap for a new Student object
Return: a new Student object, with all fields filled in
*/
public StudentADT(String firstNm, String lastNm, int stNo, double
asn1Grade, double asn2Grade, double asn3Grade, double examGrade){
this.firstName = firstNm;
this.lastName = lastNm;
this.stNum = stNo;
this.agrades = (double[]) new double[3];
this.agrades[0] = asn1Grade;
this.agrades[1] = asn2Grade;
this.agrades[2] = asn3Grade;
this.egrade = examGrade;
}
/**
Algorithm displayStudentRecord()
Pre:
Post: displays Student info
Return: nothing
*/
public void displayStudentRecord() {
System.out.println("Record for " + this.lastName + ", " +
this.firstName + " (" + this.stNum + ") ");
System.out.println("Assignment grades");
for (int i = 0 ; i <= 2; i ++)
System.out.println(this.agrades[i]);
System.out.println("Exam grade: " + this.egrade);
}
/**
Algorithm changeAssignmentGradeForStudent(asnNum,grade)
Pre: asnNum :: Integer, the index of the assignment to grade
grade :: double, the amount to change the grade
Post: If the index is sensible, the appropriate grade is
changed
(this method allows grades to be changed arbitrarily)
Return: true if the change was made, false otherwise
*/
public boolean changeAssignmentGradeForStudent (int asnNum, double
grade) {
if (asnNum < 0 || asnNum > 2)
return false;
else {
this.agrades[asnNum] = this.agrades[asnNum] + grade;
return true;
}
}
/**
Algorithm changeExamGradeForStudent(grade)
Pre: grade :: double, the amount to change the grade
Post: the exam grade is changed
(this method allows grades to be changed arbitrarily)
Return: nothing
*/
public void changeExamGradeForStudent(double grade) {
this.egrade = this.egrade + grade;
}
}
In: Computer Science
In: Computer Science
Calculate the pH of each of the following solutions at
25oC.
(a) 0.10 M NH3
pH =
(b) 0.050 M C5H5N (pyridine) (Kb
for pyridine is 1.7 × 10-9)
pH =
In: Chemistry
Fogerty Company makes two products—titanium Hubs and Sprockets. Data regarding the two products follow:
| Direct Labor-Hours per Unit |
Annual Production |
||
| Hubs | 0.50 | 18,000 | units |
| Sprockets | 0.10 | 46,000 | units |
Additional information about the company follows:
Hubs require $30 in direct materials per unit, and Sprockets require $15.
The direct labor wage rate is $14 per hour.
Hubs require special equipment and are more complex to manufacture than Sprockets.
The ABC system has the following activity cost pools:
| Estimated | Activity | ||||
| Activity Cost Pool (Activity Measure) | Overhead Cost | Hubs | Sprockets | Total | |
| Machine setups (number of setups) | $ | 23,085 | 95 | 76 | 171 |
| Special processing (machine-hours) | $ | 147,000 | 4,900 | 0 | 4,900 |
| General factory (organization-sustaining) | $ | 82,600 | NA | NA | NA |
Required:
1. Compute the activity rate for each activity cost pool.
2. Determine the unit product cost of each product according to the ABC system.
In: Accounting
1. Imagine that you want to obtain a loan from a bank for a business that you operate through a corporation. The bank wants assurances that the loan will be repaid. It gives you a choice to advance the loan to the corporation and for the bank to obtain from the corporation a mortgage registered against land owned by the corporation, or to advance the loan to the corporation but to ask you to give the bank a personal guarantee of the loan. What are the advantages or disadvantages under either scenario?
In: Finance
Write a function named int2ordinal that takes an integer as its only parameter and returns the number with its appropriate suffix as its result (stored in a string). For example, if your function is passed the integer 1 then it should return the string "1st". If it is passed the integer 12 then it should return the string "12th". If it is passed 2003 then it should return the string "2003rd". Your function must not print anything on the screen.
You can use the remainder operator to extract the last digit of an integer by computing the remainder when the integer is divided by 10. Similarly, you can extract the last two digits of an integer by computing the remainder when the integer is divided by 100. For example 29 % 10 is 9 while 1911 % 100 is 11. Then you can construct the string that needs to be returned by your function by converting the integer parameter into a string by calling the str function, and concatenating the appropriate suffix using the + operator.
In: Computer Science
An experiment to measure the value of g is constructed using a tall tower outfitted with two sensing devices, one a distance H above the other. A small ball is fired straight up in the tower so that it rises to near the top and then falls back down; each sensing device reads out the time that elapses between the ball going up past the sensor and back down past the sensor.
(a) It takes a time 2t1 for the ball to rise past and then come back down past the lower sensor, and a time 2t2 for the ball to rise past and then come back down past the upper sensor. Find an expression for g using these times and the height H. (Use the following as necessary: t1, t2, and H.)
(b) Determine the value of g if H equals 21 m, t1 equals 4 s, and t2 equals 3.42 s.
Thank you for the help- I can't figure out how to set up the first part and get an equation that will actually allow me to solve the second part. Let me know what steps you used. Thanks!
In: Physics
Discuss the two estimation methods of classification-type data mining models while considering ANN as a classifier.
In: Computer Science
For the equilibrium: CO2(g) + H2(g) ⇌ CO(g) + H2O(g), Kp = 10-5 at 25°C and ΔS = -41.8 J/K. One mole of CO, 2 moles of H2 and 3 moles of CO2 are introduced into a 5 L flask at 25 °C. Calculate the following:
a) ΔrGo at 25°C;
b) the total pressure of the mixture at equilibrium;
c) the number of moles of each species present at
equilibrium;
d) Kp at 100°C.
In: Chemistry
Sanyu Sony started a new business and completed these transactions during December. Dec. 1 Sanyu Sony transferred $68,100 cash from a personal savings account to a checking account in the name of Sony Electric in exchange for its common stock. 2 The company rented office space and paid $2,000 cash for the December rent. 3 The company purchased $13,300 of electrical equipment by paying $5,100 cash and agreeing to pay the $8,200 balance in 30 days. 5 The company purchased office supplies by paying $900 cash. 6 The company completed electrical work and immediately collected $2,000 cash for these services. 8 The company purchased $2,880 of office equipment on credit. 15 The company completed electrical work on credit in the amount of $4,000. 18 The company purchased $500 of office supplies on credit. 20 The company paid $2,880 cash for the office equipment purchased on December 8. 24 The company billed a client $800 for electrical work completed; the balance is due in 30 days. 28 The company received $4,000 cash for the work completed on December 15. 29 The company paid the assistant’s salary of $2,000 cash for this month. 30 The company paid $540 cash for this month’s utility bill. 31 The company paid $930 cash in dividends to the owner (sole shareholder). 2.1. Prepare the income statement for the current month. 2.2. Prepare the statement of retained earnings for the current month. 2.3. Prepare the balance sheet as of the end of the month. 3. Prepare the statement of cash flows for the current month. (Cash outflows should be indicated with a minus sign.).
In: Accounting