Questions
For C++ Consider the following code defining classes for assets and office equipment: #include<string> #include<iostream> using...

For C++

Consider the following code defining classes for assets and office equipment:

#include<string>
#include<iostream>

using namespace std;

// class definition for asset
class Asset{
protected:
  int value; // value of asset in cents
public:
  Asset(int value); // constructor
  int get_value();  // get the value
};

Asset::Asset(int val){   // implementation of constructor
   value=val;
}

int Asset::get_value(){  // implementation of get_value
   return value;
}

// abstract class for office equipment
class OfficeEquipment:public Asset{
public:
   OfficeEquipment(int val); // constructor
   virtual void use_item() =0;  // not implemented here 
};

// constructor
OfficeEquipment::OfficeEquipment(int val):Asset(val){  
   return; // nothing more to do
}

class Pen:public OfficeEquipment{
public:
   Pen(int val); // constructor
   virtual void use_item();  // will define 
};

Pen::Pen(int val):OfficeEquipment(val){
        return; // nothing more to do
}

void Pen::use_item(){
        cout << "scribble, scribble" << endl;
}

class Laptop:public OfficeEquipment{
public:
   Laptop(int val); // constructor
   virtual void use_item();  // will define 
};

Laptop::Laptop(int val):OfficeEquipment(val){
        return; // nothing more to do
}

void Laptop::use_item(){
        cout << "tappity, tap, tap" << endl;
}

int main(){
        //collection of assets
        int len=4;
        Asset* my_things[len];
      
       // complete the code below

       // (1)fill the assets up with 2 pens and two laptops (different values for each)

       // (2)calculate the total value of all assets in my_things and print it out

       // (3) call use_item on each of the items in my_things

}

The code in the main() function is incomplete. Write code as described in each of the comments marked (1), (2) and (3) above. Your code for (2) and (3) should take advantage of polymorphism to keep the code simple and short.

In: Computer Science

Please don't copy from other source 1.. On October 15th, a Congressional campaign orders a quantity...

Please don't copy from other source

1.. On October 15th, a Congressional campaign orders a quantity of campaign literature from a local printer. The stated time of delivery is November 2 but there is nothing in the contract saying time is of the essence. November 8 is Election Day. The printer does not deliver the literature until November 9. When the bill arrives, the campaign refuses to pay the printer one cent. The printer contacts you and asks you to file a lawsuit to collect the bill. Explain to the printer what the legal issue is in the case? Apply the law and advise the printer of the best course of action (conclusion).

2.. Allen and Bob complete an oral contract for the sale of land from Allen to Bob for $100,000. Bob pays Allen the $100,000 and then begins to build a home on the land. At this point, Allen says that the deal is off and refuses to convey the deed to Bob. In doing so, Allen relies on the statute of frauds as a defense saying that contracts for the sale of land must be in writing and since this contract is not in writing it is unenforceable. First, explain the application of the statute of frauds to land sales. Second, state the legal issue, apply the law and reach a conclusion as to what will happen. Answer completely.

3.. Amy contracts to have her portrait painted by Herbert for $10,000. Herbert is a well known abstract artist and all of Amy’s friends have had their portrait painted by him. Herbert decides to go to Greece for the summer so he assigns the contract without talking to Amy, to Donald. Donald is another artist with a totally different style than Herbert. Amy is very upset when she finds out about the assignment and sues Herbert for breach of contract. What is the legal issue. Present both sides of the argument from a legal perspective. Reach a conclusion. What is a Judge going to do with Amy's lawsuit?

In: Operations Management

Problem/Solution Research Essay Writing Task: Write about racial discrimination in the workplace and offer potential solutions...

Problem/Solution Research Essay

Writing Task: Write about racial discrimination in the workplace and offer potential solutions to alleviate the problem.

WRITE A RESEARCH PROPOSAL

Abstract: Summarize your project/paper in fifty to one hundred words. Explain and define your topic and include the answers to the following questions:

  • Why is this problem important in today’s society?
  • Why should people read and take my argument seriously?

Purpose Statement: This section will consist of two parts.

  • The first part will be a thesis statement that provides the rationale for the project. The thesis statement should be labeled “Thesis:” Argument and 3 reasons

  • You will need to analyze your audience. Label this section “Audience Analysis:” List all individuals or groups that you think will be a part of your audience; then, list what you assume each group already knows about your topic and what each group feels or believes about your topic. Next, describe what types of information each group will need to know in order to better judge your argument. Be specific.

Statement of Qualification: Explain your experience and any special qualities or perspectives you bring to the argument. If you do not have direct experience with the topic, describe your interest in choosing this specific area of discussion and what you think your lack of experience can bring to the paper.

Review of Literature: When constructing your thesis, you should have decided on three to four initial points for discussion within your paper. Provide one source for each of these points and summarize them. Include the MLA citation with the accompanying summary (same format as usual).

Use the following format to guide you:

Review of Literature

Point One: Identify Point One here.

EXAMPLE: Smith, Ann. Treatment is Possible. New York: Straten Publishing, 1999.

     This article deals with…

In: Operations Management

Implement a Factory Design Pattern for the code below: MAIN: import java.util.ArrayList; import java.util.List; import java.util.Random;...

Implement a Factory Design Pattern for the code below:

MAIN:

import java.util.ArrayList;
import java.util.List;
import java.util.Random;

public class Main {
public static void main(String[] args) {
Character char1 = new Orc("Grumlin");
Character char2 = new Elf("Therae");

int damageDealt = char1.attackEnemy();
System.out.println(char1.name + " has attacked an enemy " +
"and dealt " + damageDealt + " damage");

char1.hasCastSpellSkill = true;

damageDealt = char1.attackEnemy();
System.out.println(char1.name + " has attacked an enemy " +
"and dealt " + damageDealt + " damage");

int damageTaken = char2.takeHit();
System.out.println(char2.name + " has taken a hit and " +
"been dealt " + damageTaken + " damage");

char2.hasDodgeAttackSkill = true;

damageTaken = char2.takeHit();
System.out.println(char2.name + " has taken a hit and " +
"been dealt " + damageTaken + " damage");
}
}

CHARACTER:

import java.util.Random;

public abstract class Character {
protected String name;
protected int strength;
protected int resilience;
protected boolean hasCastSpellSkill;
protected boolean hasDodgeAttackSkill;

public int attackEnemy() {
Random random = new Random();

int damageDealt;
if (hasCastSpellSkill) {
int spellDamage = random.nextInt(5);
damageDealt = this.strength + spellDamage;
} else {
damageDealt = strength;
}
return damageDealt;
}

public int takeHit() {
Random random = new Random();

int damageDealt = random.nextInt(15);
int damageTaken;
if (hasDodgeAttackSkill) {
double chanceToDodge = random.nextDouble();

if (chanceToDodge > 0.50) {
damageTaken = 0;
} else {
damageTaken = damageDealt - resilience;
}
} else {
damageTaken = damageDealt - resilience;
}

if (damageTaken < 0) {
damageTaken = 0;
}
return damageTaken;
}
}

ELF:

public class Elf extends Character {
public Elf(String name) {
this.name = name;
this.strength = 4;
this.resilience = 2;
}
}

ORC:

public class Orc extends Character {
public Orc(String name) {
this.name = name;
this.strength = 10;
this.resilience = 9;
}
}

In: Computer Science

3. Estimate Interval The makers of a soft drink want to identify the average age of...

3. Estimate Interval The makers of a soft drink want to identify the average age of its consumers. A sample of 61 consumers was taken. The average age in the sample was 23 years with a sample standard deviation of 5 years. Please answer the following questions: a. Construct a 95% confidence interval estimate for the mean of the consumers’ age. b. Suppose a sample of 85 was selected (with the same mean and the sample standard deviation). Construct a 95% confidence interval for the mean of the consumers’ age.

[Hint: Please see Chap008 – Slides 24-29 for formula and example. Please also see page 343-349 in the textbook.]

4. Hypothesis Testing Annual per captial consumption of milk is 21.6 gallons (Statistical Abstract of the United States: 2006). Being from the Midwest, you believe milk consumption is higher there and wish to support your opinion. A sample of 16 individuals from the Midwestern town of Webster City showed a sample mean annual consumption of 24.1 gallons with a sample standard deviation of s=4.8. a. Develop a hypothesis test that can be used to determine whether the mean annual consumption in Webster City is higher than the national mean. b. At α=0.05, test for a significant difference. What is your conclusion? Extra credit 5. A lathe is set to cut bars of steel into lengths of 9 centimeters. The lathe is considered to be in perfect adjustment if the average length of the bars it cuts is 9 centimeters. A sample of 100 bars is selected randomly and measured. It is determined that the average length of the bars in the sample is 9.085 centimeters. Suppose the population standard deviation is 0.335 centimeters. a. Formulate the hypotheses to determine whether or not the lathe is in perfect adjustment. b. Compute the test statistic. c. Using the p-value approach, what is your conclusion? Let α = .05.

In: Math

There have been some very nice discussions recently centered around the question of whether gravity and...

There have been some very nice discussions recently centered around the question of whether gravity and the geometry and topology of the classical world we see about us, could be phenomena which emerge in the low-energy limits of a more fundamental microscopic theory.

Among these, @Tim Van Beek's reply to the question on "How the topology of space [time] arises from more fundamental notions" contains the following description of the Reeh-Schlieder theorem:

It describes "action at a distance" in a mathematically precise way. According to the Reeh-Schlieder theorem there are correlations in the vacuum state between measurements at an arbitrary distance. The point is: The proof of the Reeh-Schlieder theorem is independent of any axiom describing causality, showing that quantum entanglement effects do not violate Einstein causality, and don't depend on the precise notion of causality. Therefore a change in spacetime topology in order to explain quantum entanglement effects won't work.

which is also preceded with an appropriate note of caution, saying that the above paragraph:

... describes an aspect of axiomatic quantum field theory which may become obsolete in the future with the development of a more complete theory.

I had a bias against AQFT as being too abstract an obtuse branch of study to be of any practical use. However, in light of the possibility (recently discussed on physics.SE) that classical geometry arises due to the entanglement between the degrees of freedom of some quantum many-body system (see Swingle's paper on Entanglement Renormalization and Holography) the content of the Rees-Schilder theorem begins to seem quite profound and far-sighted.

The question therefore is: Does the Rees-Schlieder theorem provide support for the idea of building space-time from quantum entanglement? or am I jumping the gun in presuming their is some connection between what the theorem says and the work of Vidal, Evenbly, Swingle and others on "holographic entanglement"?

In: Physics

Which of the following characteristics makes it easier to measure the quality of a service, relative...

Which of the following characteristics makes it easier to measure the quality of a service, relative to that of a product or facilitating good?

Select one:

A. Service portions are abstract, rather than concrete

B. Service portions are transient, rather than permanent

C. Service portions are psychological, rather than physical

D. None of the above characteristics make it easier to measure service quality

Among the best-known companies that use customer satisfaction surveys to evaluate service quality in various industries is:

Select one:

A. J.D. Power and Associates

B. McDonald’s

C. American Express

D. Alaska Airlines

Service defections are important in process control for services because:

Select one:

A. No advertising is necessary to get the business of long-term customers

B. They are equally important to organizations that produce tangible outputs

C. A customer who takes their business elsewhere is analogous to a product defect

D. Long-time customers are more likely to purchase additional products

One of the most common errors when monitoring data is to gather information that has little or no probability of changing significantly from one collection period to the next.

Select one:

True

False

There are five stages of effectiveness in terms of the role their operations play in terms of strategic business objectives.

Select one:

True

False

Departments within a stage 2 organization may exhibit a stage 3 orientation, thereby upgrading the organization to a stage 3 categorization.

Select one:

True

False

The balanced scorecard approach relies not only on financial performance measures, but includes customers, internal business processes, and organizational learning and growth.

Select one:

True

False

Benchmarking is a process that helps compare a company against its competitors on a variety of relevant indicators.

Select one:

True

False

In: Operations Management

Gender and Age Roles in Magazine Advertisements In this project, you will investigate gender and age...

Gender and Age Roles in Magazine Advertisements

In this project, you will investigate gender and age stereotypes in magazines. Look at one widely circulated magazine, and evaluate how ads depict males and females of various ages (adolescence, and early, middle, and late adulthood). You should evaluate physical appearance, personality, and behaviors as they are depicted in the magazine ads. You must use the data sheet provided below to help organize your impressions. After completing the data collection, write a brief report that answers the questions that follow.

Writing Style

Your paper must be written APA style.

It must include reference page, abstract, cover page, and a running head APA style.

It must be 2-3 pages, excluding the cover page and reference page.

Questions:

• Are all age groups represented in advertisements?

• Who is underrepresented and overrepresented? Why do you think this is so?

• Compare the various groups in terms of the characteristics used to portray them. What generalizations about age and gender do these portrayals convey? Write a well thought analysis (about 200 words) on the comparison.


Data Sheet for Gender and Age Roles in Magazine Advertisements


Magazine Title _____

Issue Date _____

Number of Ads _____

ADOLESCENTS

BOYS

GIRLS

Physical appearance:

Body message:

Clothes:

Facial expressions:

Personality:

Intelligence:

Activities:

Verbal comments:

Sexuality

Other:


YOUNG ADULTS

MEN

WOMEN

Physical appearance:

Body message:

Clothes:

Facial expressions:

Personality:

Intelligence:

Activities:

Verbal comments:

Sexuality:

Other:

MIDDLE ADULTS

MEN

WOMEN

Physical appearance:

Body message:

Clothes:

Facial expressions:

Personality:

Intelligence:

Activities:

Verbal comments:

Sexuality:

Other:

OLD ADULTS

MEN

WOMEN

Physical appearance:

Body message:

Clothes:

Facial expressions:

Personality:

Intelligence:

Activities:

Verbal comments:

Sexuality:

Other:

In: Psychology

Identify 10 APA errors in this written document. Behavior Modification: An Alternative to Drug Therapy in...

Identify 10 APA errors in this written document.

Behavior Modification: An Alternative to Drug Therapy in Treating Hyperactive Children ABSTRACT
The purpose of this study is to determine whether application of behavior modification methods can be an effective and safe alternative to amphetamine therapy in the treatment of hyperactive school children. Sixty elementary age school children who were identified as hyperactive were randomly assigned to one of three treatment groups. It was concluded that additional research is needed to determine the generalize ability of the findings to larger groups and to non-special education classes.

In recent years, the use of amphetamines in treating hperactive children, has caused much controversy and concern. According to some researchers, an estimated 400,000 hyperactive school children are presently being treated with these drugs. Much of the public’s concern has to do with the way in which children are diagnosed. Many children, for example, are being treated with amphetamines solely on the recommendations of school authoritys. Despite the fact that many teachers mistake the normal restlessness of childhood for hyperkinesis. Anohter cause for concern stems from a lack of follow-up studies on the long-term affects of amphetamines.

As an alternative to drug therapy, researchers have begun to focus on behavior modification techniques that are believed to be more safer and more effective over time (Strong, 1974). Strong (1974) conducted a two-year study with an autistic boy and found thast positive reinforcement was significantly more effective than drug therapy in reducing facial grimacing. In another study, this same researcher found token reinforcement to be more effective then medication in increasing adaptive behavior in retarded women.

Behavior modification techniques have also been studied in classroom settings. Smith (1969), for example, was able to reduce ina ppropriate classroom behavior of a ten-year old hyperactive girl by using these techniques. In another study, Nixon (1969) tested the effects of behavior modification in increasing the “on-task performance” of 24 boys who had been diagnosed as hyperactive by there teachers. In the Nixon (1969) study, their was four treatment groups which consisted of various reinforcement techniques and control. Results of a one-way analysis of variance indicated no significant differences between the groups. Although it was reported that some
of the children in each gorup made great improvement in staying on task in learning situations. The Nixon study, however, contained possible sources of error: (1) treatment groups only contained 6 subjects each; (2) there were only 8 treatment sessions;
(3) no instruments were used to evaluate children’s performance; and (4) the children knew they were participating in a study.Widespread use of amphetamines in treating hyperactive children may be a dangerous practice. Moreover, behavior modification techniques have shown to be just as effective in reducing hperactive behavior in children in certain settings.
The sample group for this study will be selected from the population of North Side Educational Center for behaviorally disturbed, elementary-age children. Those children who were diagnosed as “hyperactive” or “hyperkinetic” by the school’s psychologist were cosnidered the population. The stratified random sampling method is to be used to insure that children ages 6 through 12 were represented in the study.

In: Biology

Salem is a 15-year-old male weighing 46.6 kg. He is known to have asthma and. He...

Salem is a 15-year-old male weighing 46.6 kg. He is known to have asthma and. He accidently fell down and broke his leg while playing football. For that reason he was admitted to the hospital for surgery. Since he was 6 year-old, he presented to the emergency department many times and had 4 hospital admissions for asthma, two of them were to the intensive care unit. He often required a course of oral steroids for one month every few months. However, in the last two years his asthma was well controlled on fluticasone (inhaled steroid) and salbutamol (inhaled β-adrenergic agonist) and he didn’t need any oral steroids. Also, he had not visited the emergency department or been admitted to the hospital for the last two years.

On the day of the accident, the patient had no signs or symptoms of asthma. When he and his father were asked if he had tried aspirin or NSAIDs in the past they said they were not sure. When pain control was discussed, the father wanted to avoid morphine for its addictive effects. Consequently, the doctor prescribed him ibuprofen and planned to give him the first dose in the hospital under close observation soon after the surgery.

The surgery and anaesthesia went fine. One hour later, the patient was given a tablet of ibuprofen 400 mg orally for pain control. 10 minutes after that he began to show symptoms of asthma (shortness of breath and wheezing). For that he used his salbutamol inhaler 8 times. However, his symptoms became worse over the next 20 minutes and he was not able to talk. Soon after that, the patient became cyanosed and needed oxygen by face mask. Salbutamol inhaler was repeated and Hydrocortisone 100mg IV was given. Within 20–30 minutes his condition started to improve. Salbutamol was given every 4 hours and oral Prednisolone 50 mg once daily was initiated (for 6 days). To control the pain of his surgery he was given Morphine 5mg/4h orally and was observed closely overnight for the symptoms of asthma. He was discharged after one week. That week Salem didn’t experience any further asthma symptoms and returned home on his usual inhalers.

1.       What is the most likely explanation (at the biochemical level) for Salem’s symptoms that developed after he was given the oral ibuprofen?

2.       How do you explain the successful relief of the patient’s ibuprofen-induced symptoms after he was treated with hydrocortisone and prednisolone?

3.       In this case study, β-adrenergic agonist and steroids were used to treat and/or prevent asthma symptoms. Mention the other two medication types useful in the treatment of asthma that are mentioned in eicosanoids metabolism chapter of your course. (0.5 mark for each medication type (1 mark total))

In: Nursing