programming with C

programming with C

 

programming with C

 

Assignment

1 Write a program that will first allow a user to choose one of two options:

1. Convert a temperature from degrees Celsius to degrees Fahrenheit. 2. Convert a temperature from degrees Fahrenheit to degrees Celsius.

The program should then prompt for the temperature value to be entered and output the new value that results from the conversion. To convert from Celsius to Fahrenheit
you can multiply the value by 1.8 and then add 32. To convert from Fahrenheit to Celsius, you can subtract 32 from the value, then multiply by 5, and divide the result
by 9.

2 Write a program that takes 4 numbers a, b, c and d, then find and prints the minimum value.

3 Write a program that prompts the user to enter the date as three integer values for the month, the day in the month, and the year. The program should then output the
date in the form 31st December 2016 when the user enters 12 31 2016, for example. You will need to work out when th, nd, st, and rd need to be appended to the day
value. Don’t forget 1st, 2nd, 3rd, 4th… 11th, 12th, 13th, 14th; and 21st, 22nd, 23rd, and 24th,etc..

1- FILE NAME
SUBMIT ONE FILE FOR ALL YOUR PROGRAMS.
Always add your Firstname_lastname_assignment_X to the filename where X=assignment number.
2- FILE EXTENSION
Sumbit as .c file that I can compile and execute directly with dev c++.
3- DO NOT SUBMIT TEXT FILES OR .doc, .docx or pdf FILES
3- COMMENTS IN PROGRAM
Always add comments inside your program to explain the code. You can use // at the beginning to add comments. Comment out all those sections that are text
explanations in the code.
Example
// Your Name, Program Name, Question number
// Explanation here
4- COMMENT SECTIONS OF CODE FOR ALL QUESTIONS
After finishing and testing your program
Use
/* <program text> */
for all program sections or for separating Question Code. I will un-comment to compile and run each program to see your work.
Example:
// Q1 code
/* Your program code goes below
*/
// Q2 code below (Same as above)
========================== MORE DETAILS BELOW ========
Example one .c file. The file should look like as follows.

// Your name and ID

// program 1 code version 1
/* Tell what program one version 1 does … etc..
……
Add all the explanations etc. as required tht you answer the questions and show that you understand the code
*/

Program 1 code // version 1
Here you have your code for program 1 version 1
(Make sure to add your comments in code also always and as necessary to explain the program step)

/* At the end of program provide your inputs outputs and console printout as a comment
for version 1. This is multiple lines enclosed in comment start and end
*/
//————————————————————————
// program 1 code version 2 (IF REQUIRED in ASSIGNMENT)
/* Tell what program one does … etc..
……
Add all the explanations etc.
*/
//
Program 1 code // version 2
Here you have code for program 1 version 2 with comments
……
* At the end of program provide your inputs outputs and console printout as a comment
for version 2 etc. This is multiple lines enclosed in comment start and end
*/
/—————————————————————-
Follow same above style for all your programs (program 2, 3 .. etc.)

For your own testing you can test programs as separate files but you must send me the same code with plenty of comments in one .c file.

REMEMBER when you submit everything must be in one .c file and the name of file “fistname_lastname_assignmentX.c” where X = assignment number before submitting.

 

Current treatments and/or cures for the disease

Current treatments and/or cures for the disease

 

Current treatments and/or cures for the disease

 

To receive full credit students must use at least three credible sources when performing the research for this submission, and they must correctly cite the sources
(in-text and in a bibliography section) they use for the submission. Students should refer to additional instructor materials about finding and identifying credible
sources, and for correctly citing sources.

 

Describe and analyze two separate situations in which your social status changed in an unex- pected way based on the concepts of race, class, or gender, or some combination of the three. Explain the ways in which these unexpected changes were or were not a result of socially con- structed forces outside of your control.

Describe and analyze two separate situations in which your social status changed in an unex- pected way based on the concepts of race, class, or gender, or some combination of the three. Explain the ways in which these unexpected changes were or were not a result of socially con- structed forces outside of your control.

 

Describe and analyze two separate situations in which your social status changed in an unex- pected way based on the concepts of race, class, or gender, or some
combination of the three. Explain the ways in which these unexpected changes were or were not a result of socially con- structed forces outside of your control.

 

 

Describe and analyze two separate situations in which your social status changed in an unex- pected way based on the concepts of race, class, or gender, or some
combination of the three. Explain the ways in which these unexpected changes were or were not a result of socially con- structed forces outside of your control.

 

Quiz on the play “a midsummer night’s dream”

Quiz on the play “a midsummer night’s dream”

 

Quiz on the play “a midsummer night’s dream”

 

1.Compare and contrast the supernatural lovers and the earthly lovers in A Midsummer Night’s Dream. (Kennedy and Gioia p. 1534).

2. Give examples of high comedy and low comedy from A Midsummer Night’s Dream.

3.Describe the development of the character Nick Bottom in A Midsummer Night’s Dream. What aspects of his personality and behavior make him comic? (Kennedy and Gioia
p. 1534).

4.Describe the exposition, conflict, climax, and denouement in A Midsummer Night’s Dream.

 

Essay about linear optimization

Essay about linear optimization

1. Explain why it is sufficient to look only at basic solutions in the reformulation of the LOP with slack variables.

2. Explain why the system infeasible if the algorithm stops in phase 1.

3. Explain why the system is unbounded if in phase 2 the algorithm displays a column in the tableau with no positive entries and the corresponding entry in the objective row is negative.

4. Explain why the snr rule maintains feasibility in phase 2.

5. Explain why the optimal solution has been obtained in phase 2 when every entry in the objective row is non-

evidenced nursing

evidenced nursing

Instructions:  Read each situation carefully and answer the related questions in the space provided.  Answer each question completely, but be brief and succinct.  Excessive wordiness will not improve the quality of your answers.

 

  1. A researcher investigated the behavior of nursing students in crisis or emergency situations. The investigator was interested in comparing the behaviors of students from BSN and diploma programs to determine the adequacy of the preparation given to students in handling emergencies.  Fifty students from each type of program participated in the study.  The investigator wanted to observe reactions to crises as they might occur naturally, so the participants were not told the exact nature of the study.  Each student was instructed to perform a simple task, purportedly to investigate reaction time.  A second person, who was described as another participant but who in fact was confederate of the investigator, simulated an epileptic seizure during the study.  The investigator observed the timeliness and appropriateness of the student’s response through a one-way mirror.

 

  1. State the purpose of this study. Write an appropriate hypothesis for this study? What would the Independent Variable(s) and Dependent Variable(s) be?  (20 points)

 

 

 

  1. Evaluate the study with respect to ethical considerations. Are guidelines for ethical conduct violated?  If so, is there any justification for this violation – that is, does the knowledge to be gained outweigh the ethical transgression?  If not, suggest some modification that handles the ethical consideration better.  (10 points)

 

 

 

  1. In each of the following research problems, identify the independent and dependent variables: (20 points)

 

  1. Does assertiveness training Independent:  _____­­­­­­­_____________________________________

improve the effectiveness of

psychiatric nurses?                              Dependent:    ___________________________________________

 

  1. Does the postural positioning Independent:  ___________________________________________

of  patients affect respiratory

function?                                            Dependent:     ___________________________________________

 

  1. Is tolerance for pain related Independent:  __________________________________________

to the age and sex of a patient?

Dependent:     __________________________________________

 

  1. Are levels of stress among Independent:  __________________________________________

nurses higher in pediatric

or general intensive-care units?                       Dependent:   ___________________________________________

 

  1. In a study of how different doses Independent:  __________________________________________

of a drug affect the severity of

symptoms, a researcher could              Dependent:   ___________________________________________

compare the frequency and

intensity of symptoms when

different doses are administered.

 

  1. A researcher hypothesized that the wearing of dentures has a negative effect on the appetite of chemotherapy patients. She tested this hypothesis by comparing two groups of patients on chemotherapy at a small rural hospital – 15 who wore dentures and 15 who did not.  Data regarding the patient’s appetite were collected in two ways.  First, patients were asked 10 true/false questions concerning their eating habits and interest in food (e.g., ” I look forward to eating my meals” and “I don’t have as much interest in food as I used to”).  Second, each patient was observed eating dinner; the observer rated patients on a 10-point scale in terms of (a) amount of food consumed and (b) degree of perceived appetite for interest in eating.  The researcher found only small differences in the appetites and eating behaviors of the two groups and concluded that her hypothesis could not be supported.

 

  1. Describe the researcher’s overall research design.  What extraneous variables might be important to

control in this study?  Did the design control these variables?  (10 points)

 

Overall design:

 

 

Extraneous variables and how they are controlled:

 

 

 

 

  1. How were the research variables measured?  Could they have been operationalized (measured) more effectively?

(10 points)

 

 

 

 

 

  1. Describe the study sample.  What type of sampling design was used?  Were subjects selected so as to

adequately represent the population?   (10 points)

 

 

 

 

 

  1. State whether each of the following is a nondirectional or directional hypothesis. (10 points)

 

  1. Nurses’ attitudes toward mental retardation vary _______________________________

according to their clinical specialty areas.

 

  1. Nurses who initiate conversation with patients                 ________________________________

are rated as more effective in their nursing care

by patients than those who initiate less conversation.

 

  1. The incidence of decubitus ulcers is related to                  ________________________________

the frequency of the turning of bed-ridden patients

.

  1. Nurses and patients differ in terms of the relative             ________________________________

importance they attach to having the patients

physical versus emotional needs.

 

  1. Women who give birth by cesarean section are ________________________________

more likely to experience postpartum depression

than women who give birth normally.

 

 

 

  1. A researcher hypothesized that aging negatively affects intellectual capacity and motor responsivity. To test this hypothesis, she randomly selected the names of 250 men aged 70 or above, 250 men in their 50’s, and 250 men in their 30’s from the residents living in a medium sized city in Illinois.  The researcher realized that intellectual capacity is sometimes correlated with social class and that mortality rates vary by social class.   Therefore, the subjects were selected in such a way that half in each group were from low-income households (household income of $15,000 or less) and half were from high-income households (incomes of over $15,000).  The 750 subjects were each administered an individual intelligence test that measured verbal aptitude, problem solving, quantitative skills, spatial aptitude, and overall intelligence.  In addition, the participants were given various reaction-time tests.  The analysis of the data revealed that, as hypothesized, intelligence declined with age in both income groups.  Except on the measure of verbal aptitude, the subjects in their 30s scored highest; the subjects in their 70s scored lowest on the subtests of intellectual capacity and on overall intelligence.  The same pattern was observed for reaction time.  The researcher concluded that the aging process causes deterioration of both intellectual and motor capacity.

 

  1. Evaluate the internal validity (the degree that the independent variable caused the observed effect) of the study.  What are the threats to its internal validity?   (10 points)

 

 

 

 

 

 

  1. What extraneous variables did the researcher identify, and by what method were they controlled?

How else might have those variables been controlled?  (10 points)

 

 

 

 

  1. You are a nurse researcher in a mental health facility. You have been reading about social support theory, and you believe it might provide an explanation for some of the behavior displayed by adolescents in your facility.

 

The main principles of this theory are:

Social support facilitates self-actualizing tendencies throughout the lifespan

Social support involves interpersonal interaction that produce a sense of belonging

Social support communicates positive feelings.

Social support positively affects self-esteem.

 

  1. You decide to test this theory by developing a quantitative research study utilizing some aspect of social support theory as your theoretical framework. Describe the process you would go through to design and implement this study, and include the following. (20 points)

 

  • Write a hypothesis.

 

 

 

  • Identify the independent and dependent variables in your hypothesis.

 

 

 

  • What type of sampling would you use?

 

 

 

  • How would you collect data on your variables?

 

 

 

  • What type of statistical analysis would be appropriate?

 

 

 

 

 

  1. Describe a method for studying what you are experiencing with these patients using a qualitative design, including (20 points):

 

  • The research question.

 

 

 

 

  • Data collection.

 

 

 

 

  • Data analysis.

 

 

TENSION BETWEEN THE MEANS AND THE ENDS

TENSION BETWEEN THE MEANS AND THE ENDS

#1 – TENSION BETWEEN THE MEANS AND THE ENDS:

Officers will at some point in their careers encounter situations where the good ends cannot be achieved by legal ends. If they break the law to pursue good ends, they will have corrupted themselves by breaking the law they were sworn to uphold. Passionate officers are those so committed to good ends that they ignore just means. The three protagonists are LAPD officers. Edmund Exley is a “straight arrow” who informs on other officers in a police brutality scandal. He’s a politician and a ladder-climber first-and-foremost. This earns the antagonism of Wendell “Bud” White, an intimidating enforcer with a personal fixation on men who abuse women. Between the two of them is Jack Vincennes, who acts as more of a celebrity than a cop who is a technical advisor on a police television show called Badge of Honor (similar to the real life show Dragnet) and provides tips to a scandal magazine. What moral dilemmas do you see develop in the film? Identify each character’s passions and how should they be tempered with a real perspective?

 

#2 – THE BLUE CODE OF SILENCE:

The Blue Code of Silence or Wall of Silence is an unwritten rule among police officers in the United States not to report on a colleague’s errors, misconducts, or crimes. If questioned about an incident of misconduct involving another officer (e.g. during the course of an official inquiry), while following the code, the officer being questioned would claim ignorance of another officer’s wrongdoing. It represents an effort to control “ends,” the outcome of events; ends cannot be controlled. The code is considered to be police corruption and misconduct. Officers who follow the code are unable to report fellow officers who participate in corruption due to the unwritten laws of their “police family;” this is depicted throughout the move. When officers are hired, they are already on the crime-control side of the continuum. Important referents in their environment encourage behavior that is crime-control oriented and reinforce temptations for noble cause corruption. From an organizational point of view, something has to go wrong for line officers to move back towards a balanced perspective. In your opinion, which scene(s) depicts this concept most strongly and why? Please provide two examples.

#3 – ETHICAL DILEMMAS:

The purpose of this course is to provide a way of thinking about police ethical dilemmas, and for police officers to think ethically about their work. Accurate information about the prevalence of police corruption is hard to come by, since the corrupt activities tend to happen in secret and police organizations have little incentive to publish information about corruption. One study of corruption in the Los Angeles Police Department (focusing particularly on the Rampart Scandal) proposed that certain forms of police corruption may be the norm, rather than the exception in American policing. Understanding that this film was made for entertainment, in what areas of the film do you feel substantiate this concept? Please provide one example.

#4 – VALUES & CULTURE:

Police officers bring to their work a set of cultural predispositions, and police work has only a minor effect on these predispositions.  How have these predispositions shaped police subculture?

#5 – LEGITIMACY:

According to the text, legitimacy is whether or not influential constituents are in agreement with the way the police do their work. For police chiefs, maintaining legitimacy requires that they balance their expectations with departmental constituencies. As a police chief, how would you ensure police legitimacy?

#6 – STRESS:

Role stress refers to characteristics of a person’s organizational role that produces adverse consequences for officers. It is produced by the organization or factors related closely to the organization.  How does stress impact the theory of noble cause?

#7 -Training Day Movie Critique Question #1:

Analyze how the slippery slope theory contributes to ethical behavior in law enforcement. How does the slippery slope contribute to illegal and unethical decision-making in policing or corrections.

#8 –  Assignment 4B

Question #2:

Examine the factors that contribute to law enforcement officers protecting peers who exhibit unethical behavior? Why would some law enforcement or correctional officers risk their own careers to protect unethical or illegal behavior by their peers?

#9 – 4C Question #3:

Compare and contrast specific value-based decision-making demonstrated by police officers in the film and in a real-life police corruption event that occurred within the last five years.

#10 – Assignment 5

Question #1

Analyze the Crime Control Model. What are the consequences for dishonesty in criminal justice agencies?

#11 – Assignment 5B

Question #2

How does the Wall of Silence impact law enforcement or corrections? Examine how the practice affects community perceptions of law enforcement or correctional organizations.

#12 – Assignment 5 C

Question #3

What are the legal ramifications for a city, county, or state when responding to allegations of criminal or unethical behavior by a law enforcement official?

#13 – Assignment 6

Rampart CRASH Unit Article Review: http://www.pbs.org/wgbh/pages/frontline/shows/lapd/scandal/cron.html

 

In the online course shell for this class, there are three discussion questions for you to respond to.

In addition to posting your own responses, you will be required to reply to at least three other

Student’s posts.

 

Listed below are the questions:

 

Question #1:

Utilizing information from the Rampart CRASH Unit article, evaluate and describe how the scandal affected the Los Angeles Police Department (LAPD).

#14 – Assignment 6B

 

Question #2

Compare and contrast the ethical and unethical issues that contributed to the Rampart scandal. Evaluate how supervision contributed to problems within the enforcement unit?

#15 – Assignment 6 C

Question #3

If you were a newly hired chief of police, sheriff, or chief of corrections what ethical based program would you implement to prevent a Rampart type scandal from occurring in your organization?