Questions
Write a program to implement problem statement below: provide the menu for input N and number...

Write a program to implement problem statement below:

provide the menu for input N and number of experiment M to calculate average time on M runs. randomly generated list. State your estimate on the BigO number of your algorithm/program logic. (we discussed in the class) Measure the performance of your program by given different N with randomly generated list with multiple experiment of Ns against time to draw the BigO graph (using excel) we discussed during the lecture. Lab-08-BigBiggerBiggtest.png *** high level of algorithm for measurement,

Step1. Given N>0, M >0, Input N, M, set C=M

Step2. While C is greater than 0, repeat Step 3 to 8

Step3. Fill the Array[N] with random number

Step4. record start time

Step5. call biggest(Array[N] return the biggest number and position

Step6. record end time

Step7. decrement C

Step8, running time[C] = end time - start time

Step9, Calculate average running time based on running time[M]

Step10. Record N and average running time into 2D Array *** use of clock function for benchmarking measure in milliseconds, http://en.cppreference.com/w/cpp/chrono/c/clock (Links to an external site.) *** you should use 2D array to store your experiment time with different N. biggest-example.rtf

Programming language: C++

In: Computer Science

Write an overall reflection of Zimbardo’s experiment. What did you think about what you saw? What...

Write an overall reflection of Zimbardo’s experiment. What did you think about what you saw? What was your reaction to the behaviors? Etc.
What are your thoughts about the guard “John Wayne”? Why did he act so sadistically? Why did the other guards let him lead that way? Why did the prisoners obey him if this was all pretend? What kind of transformations did the prisoners take on throughout the act of humiliation and degradation? Explain.
Prisoner 8612 played the role of the crazy prisoner; Prisoner 416 claimed to lose his identity and totally submerge in the role of prisoner; Sarg was an obedient prisoner. Why do some rebel, while others are submissive? John Wayne was a sadistic guard. Why? Do all have the ability to be sadistic? Is it human nature? How far do people go?
What is identity? Is there a core to your self-identity independent of how others define you? How difficult would it be to remake any given person into someone with a new identity?
Explain why this study was unethical. Give specific examples.
How does this experiment relate to the real world? What in your life would be examples of conforming into assigned roles? What would be examples of conforming to submission or conforming to authority? What are some real-world examples that would compare with the prison guard/prisoner relationship? Explain how and why. How does this experiment tie into the Right Answer myth and Group think?

In: Psychology

Professional Practices and Ethics Case study 1: Violation of privacy Marcus is a computer engineer who...

Professional Practices and Ethics

Case study 1: Violation of privacy

Marcus is a computer engineer who has recently developed an application which helps users keep track of medical information, doctor’s appointments, and prescriptions. Information about the user is stored in this application, including what prescriptions they are taking and how frequently they schedule doctor’s appointments. As the developers of the application, Marcus and his company have access to this information. The marketing department requests Marcus to supply them with customer-specific information so they can better target advertisements and application suggestions to the users. Marcus understands that he is part of a company, but also feels that the privacy of the app users should be protected. Additionally, Marcus feels that as an engineer, he should be responsible to those who use his technology.

Source: Clare Bartlett was a 2014-2015 Hackworth Fellow in Engineering Ethics at the Markkula Center for Applied Ethics at Santa Clara University

Question 1: Read case study 1[Violation of privacy] to answer the following questions.

  1. How does Marcus determine how much of the user’s information should be shared with marketing? [Answer considering internal / external pathway of conflict resolution]
  2. Is this an ethical use of information or a violation of the user’s privacy? [Answer considering moral principles of respect]

In: Operations Management

A firm producing computers considers a new investment which is about opening a new plant. The...

A firm producing computers considers a new investment which is about opening a new plant.

The project’s lifetime is estimated as 5 years and requires 22 million $ as investment cost. Salvage value of the project is estimated as 4 million $ (which will be received in the sixth year) However the firm prefers to show salvage value only as 2 million $. The firm uses 5-year straight-line depreciation.

It is estimated that the sales will be 12 million $ next year and then sales will grow by 20% each year.

It is estimated that fixed costs will be 1.5 million next year and then will grow by 5% each year.

Variable costs are projected %10 of sales each year.

This project, in addition, requires a working capital of $ 3 million in the first year, 4 million in the second year, 4 million in the third year, 3 million in the fourth year and 1.5 million in the fifth year.

Firm plans to use a debt/equity ratio of %50 in this project.

The company can borrow $ loan with an interest cost of 14% before tax. Corporate tax rate is 20%. The shares of this company in NYSE are selling at 8 $ and the stocks have approximately market risk and have a strong correlation with NYSE index. 10- year government bond yields at %12 and market risk premium is %8.

Given this information; find the NPV and IRR of the project; is this project feasible or not?

What is the result of higher WACC ? Can a company reduce its WACC ? If yes, how? Give numerical example related with this project and explain this topic briefly regarding to the capital structure theories.

Please solve this CLEARLY

Andrew Jim Moore. UC Berkeley.

In: Finance

Only need answers for e,f,g,h,i Jacob has the utility function for goods x and y asu(x,...

Only need answers for e,f,g,h,i

Jacob has the utility function for goods x and y asu(x, y) = ?2/3?2/3.

The price of good x is $2 each, and the price of good y is $5 each. Jacob has a total income of $120 to spend on these two goods.

(a) Write down Jacob's budget line, and show in the graph.
(b) Write down the budget exhaustion condition (BC) of Jacob’s optimization problem.(c) Write down the rationality condition (RC) of Mr. Jacob’s optimization problem.

(d) Given the two conditions from (b) and (c), calculate the optimal bundle (x*, y*) that he will choose in order to maximize his utility, and (approximately) indicate this optimal bundle in the graph.

Now, the price of good x increases to $4 each, and everything else remains the same.

(e) Given the change in the price of good x, calculate the new optimal bundle (x**, y**).

(f) How much additional income does Jacob need in order to consume at the original optimal bundle as in (d)?

(g) Suppose Jacob is a cardholder of a credit card, where the credit card company decides to compensate its members, so all of its members are able to maintain their utility level as the same as before the price changed. Write down the utilization condition (UC) of Jacob’soptimization problem after price changed.

(h) Given the condition in (g), calculate Jacob’s new optimal bundle (xc, yc) under the compensation.

(i) What is the amount that the credit card company needs to compensate Jacob? Compare the result with (f).

In: Economics

Please create a python module named homework.py and implement the classes and methods outlined below. Below...

Please create a python module named homework.py and implement the classes and methods outlined below. Below you will find an explanation for each class and method you need to implement. When you are done please upload the file homework.py to Grader Than. Please get started as soon as possible on this assignment. This assignment has many problems, it may take you longer than normal to complete this assignment. This assignment is supposed to represent a group of students in a course. A group of students in a course will be assigned an assignment and produce a collection of assignment results. The results will be used to figure out grade statistics. The grade they receive for their work on the assignment is entirely dependant on the student's energy level. If the student works on many assignments without sleeping their grade will suffer. You will implement four classes (Assignment, AssignmentResult, Student, and Course), they will depend on each other in the order they are listed. Hint: Work on the methods in the order they are found in the documentation below, implement the getter and setter methods before the more complicated methods. Work on the Assignment class, AssignmentResult class, Student class and Course class in that order. Class Assignment This object represents a school assignment that a student will work on.

__init__(self, name: str, difficulty: float):

""" Constructs an assignment with the given assignment name and a float that indicates the level of difficulty of the assignment. :param name: The name of the assignment :param difficulty: The level of difficulty of the assignment

"""

name(self) -> str:

"""

Returns the name of the assignment as specified in the constructor. :return: The assignment name

"""

difficulty(self) -> str:

"""

Returns the level of difficulty of the assignment as specified in the constructor. :return: The assignment level

"""

__str__(self) -> str:

"""

Returns the name of the assignment as specified in the constructor. :return: The assignment name

"""

Class AssignmentResult An object that represents the result of an assignment.

__init__(self, id:int, assignment: Assignment, grade: float):

"""

This will contain the ID of the student, the assignment that the student worked on and the grade the student received on the assignment. :param id: The ID of the student that created this Assignment result :param assignment: The Assignment that the student worked on. :param grade: A number between 0-1 representing the numerical grade the student received

"""

id(self) -> int:

"""

Returns the ID of the student as specified in the constructor. :return: The student's ID

"""

grade(self) -> float:

""" Returns the grade as specified in the constructor. :return: The grade the student received for this assignment

"""

assignment(self) -> Assignment:

""" Returns the assignment as specified in the constructor. :return: The assignment that the student worked on to create this result

"""

Class Student This class represents a single student

__init__(self, id: int, fist_name: str, last_name: str, town:str):

"""

This creates a student object with the specified ID first and last name and home town. This constructor should also create data structure for holding the students grades for all of there assignments. Additionally it should create a variable that holds the student's energy level which will be a number between 0 and 1. :param id: The student's identifiaction number :param fist_name: The student's first name :param last_name: The student's last name :param town: The student's home town

"""

id(self)->int:

"""

Returns the ID of the student as specified in the constructor. :return: The student's ID """ first_name(self) -> str: """ Returns the first name of the student. :return: The student's first name """ set_first_name(self, name:str): """ Changes the student first name to the specified value of the name parameter. :param name: The value that the first name of the student will equal. """ last_name(self) -> str:

"""

Returns the last name of the student. :return: The student's last name """ set_last_name(self, name: str):

"""

Changes the student last name to the specified value of the name parameter. :param name: The value that the last name of the student will equal.

"""

town(self) -> str:

""" Returns the hometown of the student. :return: The student's town name

"""

set_town(self, town: str):

""" Changes the student's hometown to the specified value of the town parameter. :param name: The value that the hometown of the student will equal.

"""

__str__(self) ->str:

"""

Returns a string containing the student's first and last name separated by a space. :return: Returns a string of the full name of the student

"""

grade(self)->float:

"""

Calculates a an average grade based off of the student's past assignment's grades. The lowest grade is not included in the grade calculation if the student has been assigned to two or more assignments in the past. See assign() for more detains. If the student has not been assigned any assignments in the pass this should return 0. :return: A number between 0-1 indicating the student's grade

"""

assign(self, assignment:Assignment) -> AssignmentResult:

"""

This function is to simulate the process of the student receiving an assignment, then working on the assignment, then submitting the assignment and finally receiving grade for the assignment. This function will receive an assignment then a grade should be calculated using the following formula: grade = 1 - (Student's current energy X Assignment difficulty level). The min grade a student may receive is 0% (0) After the grade is calculated the student's energy should be decreased by percentage difficulty. Example if the student has 80% (.8) energy and the assignment is a difficultly level .2 there final energy should be 64% (.64) = .8 - (.8 * .2). The min energy a student may have is 0% (0) Finally the grade calculated should be stored internally with in this class so it can be retrieved later. Then an Assignment Result object should be created with the student's ID, the assignment received as a parameter, and the grade calculated. This newly created Assignment Result object should be returned. :return: The an AssignmentResult outlining this process

"""

sleep(self, hours:float):

"""

This function restore the student's energy as a rate of 10% per hour. So if they sleep for 8 hours there energy will be restored by 80%. If they have 50% (.5) energy and sleep for 8 hours the will wake up with 90% energy = (.5 * (1+.8)). The max energy a s student may have is 100% (1) :param hours: The number of hours a student will sleep for. Example: .2 is equal to 12 minutes or 20% of an hour. :return: None

"""

energy(self):

"""

Returns the current energy of the student. A number between 0 and 1 :return: The energy of the student.

"""

Class Course This class represents a course that a group of students is enrolled in. They will be assigned assignments when enrolled in this course. This object will be used to calculate aggregate student statistics. __init__(self, students: list): """ Constructs a course with the specified list of students :param students: A list containing one or more students

"""

mean_grade(self) -> float:

"""

Returns the numerical value of the class mean (average) grade. :return: The average student grade

"""

max_grade(self) -> float:

"""

Returns the highest grade in the class. The grades used in the calculation come from the student.grade(), it does not care if a grade was earned when the student was in another class. :return: The highest grade in the class

"""

min_grade(self):

"""

Returns the highest grade in the class. The grades used in the calculation come from the student.grade(), it does not care if a grade was earned when the student was in another class. :return: The highest grade in the class

"""

median_grade(self) -> float:

"""

Calculates and returns the median (middle value) of all the student's grades in this course The grades used in the calculation come from the student.grade(), it does not care if a grade was earned when the student was in another class. :return: The median grade

"""

grade_variance(self) -> float:

"""

Calculates and returns the sample variance of all the student's grades in this course The grades used in the calculation come from the student.grade(), it does not care if a grade was earned when the student was in another class. :return: The sample variance of the grades

"""

grade_std_dev(self) -> float:

"""

Calculates and returns the sample standard deviation of all the student's grades in this course. The grades used in the calculation come from the student.grade(), it does not care if a grade was earned when the student was in another class. :return: The sample standard deviation of the grades

"""

assign(self, name: str, difficulty: float) -> None:

"""

This creates an assignment using the parameters specified, then assigns it to all of the students in this course, by calling the assign method on each student. Subsequent invocations to the statistics methods above should reflect the changes made by this method after it is called. In other words if a very difficult assignment is assigned the course mean should be less after. :param name: The name of the assignment :param difficulty: The level of difficulty of the assignment :return: None

"""

can someone help me on this Q with some explanation ? thank you in advance!

In: Computer Science

Two microwave signals of nearly equal wavelengths can generate a beat frequency if both are directed...

Two microwave signals of nearly equal wavelengths can generate a beat frequency if both are directed onto the same microwave detector. In an experiment, the beat frequency is 170MHz . One microwave generator is set to emit microwaves with a wavelength of 1.410cm.

If the second generator emits the longer wavelength, what is that wavelength?

In: Physics

A random experiment consists of throwing a coin marked with the labels "Face" and "Cross". Suppose...

A random experiment consists of throwing a coin marked with the labels "Face" and "Cross". Suppose the probability of obtaining each of these results is p and 1-p, respectively. Calculate and graph accurately the probability function and the function of distribution of variable X defined as follows:

X("Face")=3

X("Cross")=5

In: Statistics and Probability

You want to determine if eating more fruits reduces a person’s chance of developing cancer. You...

You want to determine if eating more fruits reduces a person’s chance of

developing cancer. You watch people over the years and ask them to tell you how

many servings of fruit they eat each day. You then record who develops cancer.

Is this an observation or an experiment? Why?

In: Statistics and Probability

Explain how developments made in the understanding of the atomic model changed from Bohr till Quantum model


Starting from discovery of electron, then gold foil experiment, Bohr model and then de Broglie and Heisenberg principle have played a vital role in the development of Quantum model of atomic structure. Explain how developments made in the understanding of the atomic model changed from Bohr till Quantum model? 

In: Computer Science