Questions
The purpose of creating an abstract class is to model an abstract situation. Example: You work...

The purpose of creating an abstract class is to model an abstract situation.

Example:

You work for a company that has different types of customers: domestic, international, business partners, individuals, and so on. It well may be useful for you to "abstract out" all the information that is common to all of your customers, such as name, customer number, order history, etc., but also keep track of the information that is specific to different classes of customer. For example, you may want to keep track of additional information for international customers so that you can handle exchange rates and customs-related activities, or you may want to keep track of additional tax-, company-, and department-related information for business customers.

Modeling all these customers as one abstract class ("Customer") from which many specialized customer classes derive or inherit ("InternationalCustomer," "BusinessCustomer," etc.) will allow you to define all of that information your customers have in common and put it in the "Customer" class, and when you derive your specialized customer classes from the abstract Customer class you will be able to reuse all of those abstract data/methods.This approach reduces the coding you have to do which, in turn, reduces the probability of errors you will make. It also allows you, as a programmer, to reduce the cost of producing and maintaining the program.

In this assignment, you will analyze Java™ code that declares one abstract class and derives three concrete classes from that one abstract class. You will read through the code and predict the output of the program.

Read through the linked Java™ code carefully.

Predict the result of running the Java™ code. Write your prediction into a Microsoft® Word document, focusing specifically on what text you think will appear on the console after running the Java™ code.

In the same Word document, answer the following question:

  • Why would a programmer choose to define a method in an abstract class, such as the Animal constructor method or the getName() method in the linked code example, as opposed to defining a method as abstract, such as the makeSound() method in the linked example?

CODE:

/**********************************************************************

*           Program:          PRG/421 Week 1 Analyze Assignment

*           Purpose:           Analyze the coding for an abstract class

*                                   and two derived classes, including overriding methods

*           Programmer:     Iam A. Student

*           Class:               PRG/421r13, Java Programming II

*           Instructor:        

*           Creation Date:   December 13, 2017

*

* Comments:

* Notice that in the abstract Animal class shown here, one method is

* concrete (the one that returns an animal's name) because all animals can

* be presumed to have a name. But one method, makeSound(), is declared as

* abstract, because each concrete animal must define/override the makeSound() method

* for itself--there is no generic sound that all animals make.

**********************************************************************/

package mytest;

// Animal is an abstract class because "animal" is conceptual

// for our purposes. We can't declare an instance of the Animal class,

// but we will be able to declare an instance of any concrete class

// that derives from the Animal class.

abstract class Animal {

// All animals have a name, so store that info here in the superclass.

// And make it private so that other programmers have to use the

// getter method to access the name of an animal.

private final String animalName;

// One-argument constructor requires a name.

public Animal(String aName) {

animalName = aName;

}

// Return the name of the animal when requested to do so via this

// getter method, getName().

public String getName() {

return animalName;

}

// Declare the makeSound() method abstract, as we have no way of knowing

// what sound a generic animal would make (in other words, this

// method MUST be defined differently for each type of animal,

// so we will not define it here--we will just declare a placeholder

// method in the animal superclass so that every class that derives from

// this superclass will need to provide an override method

// for makeSound()).

public abstract String makeSound();

};

// Create a concrete subclass named "Dog" that inherits from Animal.

// Because Dog is a concrete class, we can instantiate it.

class Dog extends Animal {

// This constructor passes the name of the dog to

// the Animal superclass to deal with.

public Dog(String nameOfDog) {

super(nameOfDog);

}

// This method is Dog-specific.

@Override

public String makeSound() {

return ("Woof");

}

}

// Create a concrete subclass named "Cat" that inherits from Animal.

// Because Cat is a concrete class, we can instantiate it.

class Cat extends Animal {

// This constructor passes the name of the cat on to the Animal

// superclass to deal with.

public Cat(String nameOfCat) {

super(nameOfCat);

}

// This method is Cat-specific.

@Override

public String makeSound() {

return ("Meow");

}

}

class Bird extends Animal {

// This constructor passes the name of the bird on to the Animal

// superclass to deal with.

public Bird (String nameOfBird) {

super(nameOfBird);

}

// This method is Bird-specific.

@Override

public String makeSound() {

return ("Squawk");

}

}

public class MyTest {

public static void main(String[] args) {

// Create an instance of the Dog class, passing it the name "Spot."

// The variable aDog that we create is of type Animal.

Animal aDog = new Dog("Spot");

// Create an instance of the Cat class, passing it the name "Fluffy."

// The variable aCat that we create is of type Animal.

Animal aCat = new Cat("Fluffy");

// Create an instance of (instantiate) the Bird class.

Animal aBird = new Bird("Tweety");

//Exercise two different methods of the aDog instance:

// 1) getName() (which was defined in the abstract Animal class)

// 2) makeSound() (which was defined in the concrete Dog class)

System.out.println("The dog named " + aDog.getName() + " will make this sound: " + aDog.makeSound());

//Exercise two different methods of the aCat instance:

// 1) getName() (which was defined in the abstract Animal class)

// 2) makeSound() (which was defined in the concrete Cat class)

System.out.println("The cat named " + aCat.getName() + " will make this sound: " + aCat.makeSound());

System.out.println("The bird named " + aBird.getName() + " will make this sound: " + aBird.makeSound());

}

}

In: Computer Science

Story: "Rice" The daughter of Indian immigrants, Jhumpa Lahiri was born in London in 1967. Her...

Story: "Rice"

The daughter of Indian immigrants, Jhumpa Lahiri was born in London in 1967. Her family moved to the United States, where she attended Barnard College and received multiple graduate degrees, including a Ph.D. in Renaissance studies from Boston University. She is the author of three books, including Interpreter of Maladies (1999) and The Namesake (2003), as well as many short stories. Lahiri has won several literary awards, including a Pulitzer Prize and a PEN/Hemingway Award. Her fiction often explores Indian and Indian-American life and culture — as does this personal essay, which originally appeared in the New Yorker magazine. Background on rice Along with corn and wheat, rice remains one of the most important crops in the world, especially in Asia, where it has been cultivated for thousands of years. Rice accounts for between 35 percent and 85 percent of the calories consumed by billions of people living in India, China, and other Asian countries. Indeed, the ancient Indian word for rice (“dhanya”) means “sustainer of the human race.” But rice can be symbolic as well: we throw rice at weddings because it suggests fertility and prosperity. For Lahiri, the significance of rice is personal rather than universal. She describes her father’s pulao dish as both an expression of his idiosyncratic personality and a symbol that binds her family together. My father, seventy-eight, is a methodical man. For thirty-nine years, he has had the same job, cataloguing books for a university library. He drinks two glasses of water first thing in the morning, walks for an hour every day, and devotes almost as much time, before bed, to flossing his teeth. “Winging it” is not a term that comes to mind in describing my father. When he’s driving to new places, he does not enjoy getting lost. In the kitchen, too, he walks a deliberate line, counting out the raisins that go into his oatmeal (fifteen) and never boiling even a drop more water than required for tea. It is my father who knows how many cups of rice are necessary to feed four, or forty, or a hundred and forty people. He has a reputation for andaj — the Bengali word for “estimate” — accurately gauging quantities that tend to baffle other cooks. An oracle of rice, if you will. But there is another rice that my father is more famous for. This is not the white rice, boiled like pasta and then drained in a colander, that most Bengalis eat for dinner. This other rice is pulao, a baked, buttery, sophisticated indulgence, Persian in origin, served at festive occasions. I have often watched him make it. It involves sautéing grains of basmati in butter, along with cinnamon sticks, cloves, bay leaves, and cardamom pods. In go halved cashews and raisins (unlike the oatmeal raisins, these must be golden, not 1 2 3 08_KIR_67684_CH7_151_210.indd 172 Achorn International 11/04/2011 03:45PM 08_KIR_67684_CH7_151_210.indd 173 Achorn International 11/04/2011 03:45PM lahiri /Rice 173 black). Ginger, pulverized into a paste, is incorporated, along with salt and sugar, nutmeg and mace, saffron threads if they’re available, ground turmeric if not. A certain amount of water is added, and the rice simmers until most of the water evaporates. Then it is spread out in a baking tray. (My father prefers disposable aluminum ones, which he recycled long before recycling laws were passed.) More water is flicked on top with his fingers, in the ritual and cryptic manner of Catholic priests. Then the tray, covered with foil, goes into the oven, until the rice is cooked through and not a single grain sticks to another. Despite having a superficial knowledge of the ingredients and the technique, I have no idea how to make my father’s pulao, nor would I ever dare attempt it. The recipe is his own, and has never been recorded. There has never been an unsuccessful batch, yet no batch is ever identical to any other. It is a dish that has become an extension of himself, that he has perfected, and to which he has earned the copyright. A dish that will die with him when he dies. In 1968, when I was seven months old, my father made pulao for the first time. We lived in London, in Finsbury Park, where my parents shared the kitchen, up a steep set of stairs in the attic of the house, with another Bengali couple. The occasion was my annaprasan, a rite of passage in which Bengali children are given solid food for the first time; it is known colloquially as a bhath, which happens to be the Bengali word for “cooked rice.” In the oven of a stove no more than twenty inches wide, my father baked pulao for about thirty-five people. Since then, he has made pulao for the annaprasans of his friends’ children, for birthday parties and anniversaries, for bridal and baby showers, for wedding receptions, and for my sister’s Ph.D. party. For a few decades, after we moved to the United States, his pulao fed crowds of up to four hundred people, at events organized by Prabasi, a Bengali cultural institution in New England, and he found himself at institutional venues — schools and churches and community centers — working with industrial ovens and stoves. This has never unnerved him. He could probably rig up a system to make pulao out of a hot-dog cart, were someone to ask. There are times when certain ingredients are missing, when he must use almonds instead of cashews, when the raisins in a friend’s cupboard are the wrong color. He makes it anyway, with exacting standards but a sanguine hand. When my son and daughter were infants, and we celebrated their annaprasans, we hired a caterer, but my father made the pulao, preparing it at home in Rhode Island and transporting it in the trunk of his car to Brooklyn. The occasion, both times, was held at the Society for Ethical Culture, in Park Slope. In 2002, for my son’s first taste of rice, my father warmed the trays on the premises, in the giant oven in the basement. But by 2005, when it was my daughter’s turn, the representative on duty would not permit my father to use the oven, telling him that he was not a licensed cook. My father transferred the pulao from his aluminum 4 5 6 7 08_KIR_67684_CH7_151_210.indd 174 Achorn International 11/04/2011 03:45PM 08_KIR_67684_CH7_151_210.indd 175 Achorn International 11/04/2011 03:45PM trays into glass baking dishes, and microwaved, batch by batch, rice that fed almost a hundred people. When I asked my father to describe that experience, he expressed no frustration. “It was fine,” he said. “It was a big microwave.”

Comprehension

1. How does Lahiri describe her father? What is his most important character trait?

2. According to Lahiri, what is special about pulao? Why is it served just on festive occasions?

3. What is an annaprasan? Why is this occasion so important to Bengalis?

4. Why, according to Lahiri, would she never try to make pulao?

5. What does Lahiri mean when she says that pulao is a dish for which her father “has earned the copyright” (4)?

Purpose and Audience

1. How much does Lahiri assume her readers know about Bengali culture? How can you tell?

2. Is this essay simply about rice — more specifically pulao — or is it also about something else? Explain.

3. Does this essay have an explicitly stated or an implied thesis? What dominant impression do you think Lahiri wants to convey?

Style and Structure

1. Why does Lahiri begin her essay by describing her father?

2. This essay is divided into three parts: the first describes Lahiri’s father; the second describes the making of pulao; and the third describes the occasions on which her father cooked pulao. How does Lahiri signal the shift from one part of the essay to another? What other strategies could she have used?

3. Why does Lahiri go into so much detail about her father’s pulao recipe?

4. What does pulao mean to Lahiri? Does it have the same meaning for her father? Explain.

5. Why does Lahiri end her essay with a quotation? Is this an effective closing strategy? What other strategies could she have used? 174 Description 08_KIR_67684_CH7_151_210.indd 174 Achorn International 11/04/2011 03:45PM 08_KIR_67684_CH7_151_210.indd 175 Achorn International 11/04/2011 03:45PM Lahiri /Rice 175

Vocabulary Projects

1. Define each of the following words as it is used in this selection. methodical (1) colander (3) deliberate (2) sanguine (6) oracle (2) 2. Throughout her essay, Lahiri uses several Bengali words. What might she have gained or lost if she had used English equivalents?

Journal Entry

What food do you associate with a specific member of your family? Why do you think this food has the association it does?

In: Psychology

Please post two email usage guidelines that you feel are most important to follow and tell...

Please post two email usage guidelines that you feel are most important to follow and tell us why you feel those guidelines are important (guidelines may be found online or from your experience).

1. Be concise and to the point.

Do not make an e-mail longer than it needs to be. Remember that reading an e-mail is harder than reading printed communications and a long e-mail can be very discouraging to read.

2. Answer all questions, and pre-empt further questions.

An email reply must answer all questions, and pre-empt further questions – If you do not answer all the questions in the original email, you will receive further e-mails regarding the unanswered questions, which will not only waste your time and your customer’s time but also cause considerable frustration. Moreover, if you are able to pre-empt relevant questions, your customer will be grateful and impressed with your efficient and thoughtful customer service. Imagine for instance that a customer sends you an email asking which credit cards you accept. Instead of just listing the credit card types, you can guess that their next question will be about how they can order, so you also include some order information and a URL to your order page. Customers will definitely appreciate this.

3. Use proper spelling, grammar & punctuation.

This is not only important because improper spelling, grammar and punctuation give a bad impression of your company, it is also important for conveying the message properly. Emails with no full stops or commas are difficult to read and can sometimes even change the meaning of the text. And, if your program has a spell checking option, why not use it?

4. Make it personal.

Not only should the e-mail be personally addressed, it should also include personal i.e. customized content. For this reason auto replies are usually not very effective. However, templates can be used effectively in this way, see next tip.

5. Use templates for frequently used responses.

Some questions you get over and over again, such as directions to your office or how to subscribe to your newsletter. Save these texts as response templates and paste these into your message when you need them. You can save your templates in a Word document, or use pre-formatted emails. Even better is a tool such as ReplyMate for Outlook (allows you to use 10 templates for free).

6. Answer swiftly.

Customers send an e-mail because they wish to receive a quick response. If they did not want a quick response they would send a letter or a fax. Therefore, each e-mail should be replied to within at least 24 hours, and preferably within the same working day. If the email is complicated, just send an email back saying that you have received it and that you will get back to them. This will put the customer's mind at rest and usually customers will then be very patient!

7. Do not attach unnecessary files.

By sending large attachments you can annoy customers and even bring down their e-mail system. Wherever possible try to compress attachments and only send attachments when they are productive. Moreover, you need to have a good virus scanner in place since your customers will not be very happy if you send them documents full of viruses!

8. Use proper structure & layout.

Since reading from a screen is more difficult than reading from paper, the structure and lay out is very important for e-mail messages. Use short paragraphs and blank lines between each paragraph. When making points, number them or mark each point as separate to keep the overview.

9. Do not overuse the high priority option.

We all know the story of the boy who cried wolf. If you overuse the high priority option, it will lose its function when you really need it. Moreover, even if a mail has high priority, your message will come across as slightly aggressive if you flag it as 'high priority'.

10. Do not write in CAPITALS.

IF YOU WRITE IN CAPITALS IT SEEMS AS IF YOU ARE SHOUTING. This can be highly annoying and might trigger an unwanted response in the form of a flame mail. Therefore, try not to send any email text in capitals.

11. Don't leave out the message thread.

When you reply to an email, you must include the original mail in your reply, in other words click 'Reply', instead of 'New Mail'. Some people say that you must remove the previous message since this has already been sent and is therefore unnecessary. However, I could not agree less. If you receive many emails you obviously cannot remember each individual email. This means that a 'threadless email' will not provide enough information and you will have to spend a frustratingly long time to find out the context of the email in order to deal with it. Leaving the thread might take a fraction longer in download time, but it will save the recipient much more time and frustration in looking for the related emails in their inbox!

12. Add disclaimers to your emails.

It is important to add disclaimers to your internal and external mails, since this can help protect your company from liability. Consider the following scenario: an employee accidentally forwards a virus to a customer by email. The customer decides to sue your company for damages. If you add a disclaimer at the bottom of every external mail, saying that the recipient must check each email for viruses and that it cannot be held liable for any transmitted viruses, this will surely be of help to you in court (read more about email disclaimers). Another example: an employee sues the company for allowing a racist email to circulate the office. If your company has an email policy in place and adds an email disclaimer to every mail that states that employees are expressly required not to make defamatory statements, you have a good case of proving that the company did everything it could to prevent offensive emails.

13. Read the email before you send it.

A lot of people don't bother to read an email before they send it out, as can be seen from the many spelling and grammar mistakes contained in emails. Apart from this, reading your email through the eyes of the recipient will help you send a more effective message and avoid misunderstandings and inappropriate comments.

14. Do not overuse Reply to All.

Only use Reply to All if you really need your message to be seen by each person who received the original message.

15. Mailings > use the Bcc: field or do a mail merge.

When sending an email mailing, some people place all the email addresses in the To: field. There are two drawbacks to this practice: (1) the recipient knows that you have sent the same message to a large number of recipients, and (2) you are publicizing someone else's email address without their permission. One way to get round this is to place all addresses in the Bcc: field. However, the recipient will only see the address from the To: field in their email, so if this was empty, the To: field will be blank and this might look like spamming. You could include the mailing list email address in the To: field, or even better, if you have Microsoft Outlook and Word you can do a mail merge and create one message for each recipient. A mail merge also allows you to use fields in the message so that you can for instance address each recipient personally. For more information on how to do a Word mail merge, consult the Help in Word.

16. Take care with abbreviations and emoticons.

In business emails, try not to use abbreviations such as BTW (by the way) and LOL (laugh out loud). The recipient might not be aware of the meanings of the abbreviations and in business emails these are generally not appropriate. The same goes for emoticons, such as the smiley :-). If you are not sure whether your recipient knows what it means, it is better not to use it.

17. Be careful with formatting.

Remember that when you use formatting in your emails, the sender might not be able to view formatting, or might see different fonts than you had intended. When using colors, use a color that is easy to read on the background.

18. Take care with rich text and HTML messages.

Be aware that when you send an email in rich text or HTML format, the sender might only be able to receive plain text emails. If this is the case, the recipient will receive your message as a .txt attachment. Most email clients however, including Microsoft Outlook, are able to receive HTML and rich text messages.

19. Do not forward chain letters.

Do not forward chain letters. We can safely say that all of them are hoaxes. Just delete the letters as soon as you receive them.

20. Do not request delivery and read receipts.

This will almost always annoy your recipient before he or she has even read your message. Besides, it usually does not work anyway since the recipient could have blocked that function, or his/her software might not support it, so what is the use of using it? If you want to know whether an email was received it is better to ask the recipient to let you know if it was received.

21. Do not ask to recall a message.

Biggest chances are that your message has already been delivered and read. A recall request would look very silly in that case wouldn't it? It is better just to send an email to say that you have made a mistake. This will look much more honest than trying to recall a message.

22. Do not copy a message or attachment without permission.

Do not copy a message or attachment belonging to another user without permission of the originator. If you do not ask permission first, you might be infringing on copyright laws.

23. Do not use email to discuss confidential information.

Sending an email is like sending a postcard. If you don't want your email to be displayed on a bulletin board, don't send it. Moreover, never make any libelous, sexist or racially discriminating comments in emails, even if they are meant to be a joke.

24. Use a meaningful subject.

Try to use a subject that is meaningful to the recipient as well as yourself. For instance, when you send an email to a company requesting information about a product, it is better to mention the actual name of the product, e.g. 'Product A information' than to just say 'product information' or the company's name in the subject.

25. Use active instead of passive.

Try to use the active voice of a verb wherever possible. For instance, 'We will process your order today', sounds better than 'Your order will be processed today'. The first sounds more personal, whereas the latter, especially when used frequently, sounds unnecessarily formal.

26. Avoid using URGENT and IMPORTANT.

Even more so than the high-priority option, you must at all times try to avoid these types of words in an email or subject line. Only use this if it is a really, really urgent or important message.

27. Avoid long sentences.

Try to keep your sentences to a maximum of 15-20 words. Email is meant to be a quick medium and requires a different kind of writing than letters. Also take care not to send emails that are too long. If a person receives an email that looks like a dissertation, chances are that they will not even attempt to read it!

28. Don't send or forward emails containing libelous, defamatory, offensive, racist or obscene remarks.

By sending or even just forwarding one libelous, or offensive remark in an email, you and your company can face court cases resulting in multi-million dollar penalties.

29. Don't forward virus hoaxes and chain letters.

If you receive an email message warning you of a new unstoppable virus that will immediately delete everything from your computer, this is most probably a hoax. By forwarding hoaxes you use valuable bandwidth and sometimes virus hoaxes contain viruses themselves, by attaching a so-called file that will stop the dangerous virus. The same goes for chain letters that promise incredible riches or ask your help for a charitable cause. Even if the content seems to be bona fide, the senders are usually not. Since it is impossible to find out whether a chain letter is real or not, the best place for it is the recycle bin.

30. Keep your language gender neutral.

In this day and age, avoid using sexist language such as: 'The user should add a signature by configuring his email program'. Apart from using he/she, you can also use the neutral gender: ''The user should add a signature by configuring the email program'.

31. Don't reply to spam.

By replying to spam or by unsubscribing, you are confirming that your email address is 'live'. Confirming this will only generate even more spam. Therefore, just hit the delete button or use email software to remove spam automatically.

32. Use cc: field sparingly.

Try not to use the cc: field unless the recipient in the cc: field knows why they are receiving a copy of the message. Using the cc: field can be confusing since the recipients might not know who is supposed to act on the message. Also, when responding to a cc: message, should you include the other recipient in the cc: field as well? This will depend on the situation. In general, do not include the person in the cc: field unless you have a particular reason for wanting this person to see your response. Again, make sure that this person will know why they are receiving a copy.

In: Operations Management

Amritha Singh is a middle manager with Coaster Plus Ltd(Coasters), a company that designs and...

Amritha Singh is a middle manager with Coaster Plus Ltd (Coasters), a company that designs and manufactures roller coasters for amusement parks across North America. She has been appointed one of the project managers for the design and delivery of a special roller coaster for the Ultimate Park Ltd, an American customer. A major component of the project is the steel tracking, and one possible source is Trackers Canada Ltd (Trackers). Amritha’s supervisor has asked her to negotiate the necessary contract. Amritha began negotiations with Jason Hughes. Jason is a representative of Trackers, the steel tracking manufacturer willing to supply tracking to Coasters, Amritha’s employer. Amritha provided Jason with the plans and specifications for the roller coaster, and they negotiated a number of points, including price, delivery dates, and tracking quality. A short time later, Jason offered to sell Coasters a total of 900 metres of track in accordance with the plans and specifications provided. Jason’s offer contained, among other matter, the purchase price ($1.5 million), delivery date, terms of payment, insurance obligations concerning the track, and a series of warranties related to the quality and performance of the tracking to be supplied. There was also a clause, inserted at Amritha’s express request, which required Trackers to pay $5000 to Coasters for every day it was late in delivering the tracking.

After renewing the offer several days, Amritha for several days, Amritha contacted Jason and said, “You drive a hard bargain, and there are aspects of your offer that I’m not entirely happy with. However, I accept your offer on behalf of my company. I’m looking forward to doing business with you.”

Within a month, Trackers faced a 20% increase in manufacturing costs owing to an unexpected shortage in steel. Jason contacted Amritha to explain this development and worried aloud that without an agreement from Coasters to pay 20% more for the tracking, Trackers would be unable to make its delivery date. Amritha received instructions from her supervisor to agree to the increased purchase price in order to ensure timely delivery. Amritha communicated this news to Jason, who thanked her profusely for being so cooperative and understanding.

Jason kept his word and the tracking was delivered on time. However, Coasters has now determined that its profit margin on the American deal is lower than expected, and it is looking for ways to cut costs Amritha is told by her boss to let Jason know that Coasters will not be paying the 20% price increase and will remit payment only in the amount set out in the contract. Jason and Trackers are stunned by this development.

Applying the relevant principle(s) of contract law discuss the following questions:

a) Whether the negotiations between Jason and Amritha have legal consequences. (3 marks)

b) Discuss specific applicable ways by which each party mentioned above could have avoided the contract and as well as the implications of each way identified. (4 marks)

c) Discuss the consequences of the instruction of Amritha’s boss to the effect that Coasters will not be paying the 20% price increase and will remit payment only in the amount set out in the contract. (4 marks)

In: Economics

1. For their uniforms, the Vikings soccer team has a choice of six different styles for...

1. For their uniforms, the Vikings soccer team has a choice of six different styles for the shirts, five for the shorts, and five colours for their socks. How many different uniforms are possible? A) 16 B) 150 C) 60 D) 55

2. The Niagara Ice Dogs have 4 people trying out for goal. Their coach wants to try a different goalie in each of the three periods of an exhibition game. In how many ways can the coach choose the three different goalies for the game? A) 12 B) 24 C) 7 D) 55 E) 20

3. How many arrangements of the word ALGORITHM begin with a vowel and end with a consonant? A) 18 B) 5040 C) 90720 D)181440 E) 362880

4. From a class of 14 boys and 9 girls, how many ways can I choose a committee of 6 to analyze classroom productivity with and equal number of boys and girls? A) 126 B) 252252 C) 30576 D) 448

5.A bag contains three green Christmas ornaments and four gold ornaments. If you randomly pick a single ornament from the bag, what is the probability that it will be green? A) 3/4 B)3/7 C)4/7 D)4/3

6. A bag contains three green Christmas ornaments and four gold ornaments. If you randomly pick two ornaments from the bag, at the same time, what is the probability that both ornaments will be gold?
A) 4/7 B) 2/7 C)3/7 D) none of the above

7. How many 4 digit number can be made using 0 -7 with no repeated digits allowed?
A) 5040 B) 4536 C) 2688 D) 1470

8. A coin is tossed three times. What is the probability of tossing three heads in a row?
A) 3/8 B)1/8 C)1/2 D)7/8

9. Two standard dice are rolled. What is the probability of rolling doubles (both the same number)?
A) 1/6 B)1/4 C)1/36 D) 5/36

10. There are 50 competitors in the men’s ski jumping. 30 move on to the qualifying round. How many different ways can the qualifying round be selected? A) 50! B) 30! C) 80 D) 1500 E) 1.25 × 1046

11. How many ways can the manager of a baseball team put together a batting order of his nine players, if the shortstop must bat 3rd?
A) 40320 B) 504 C) 362880 D) 120960

12. If a CD player is programmed to play the CD tracks in random order, what is the probability that it will play six songs from a CD in order from your favourite to your least favourite? A)1/6 B)2/3 C)1/720 D)5/6 E) 1/360

13. A group of eight grade 11 and five grade 12 students wish to be on the senior prom committee. The committee will consist of three students. What is the probability that only grade 12 students will be elected, assuming that all students have an equal chance of being elected?

In: Statistics and Probability

Business Analytics, Assignment on Clustering As part of the quarterly reviews, the manager of a retail...

Business Analytics, Assignment on Clustering As part of the quarterly reviews, the manager of a retail store analyzes the quality of customer service based on the periodic customer satisfaction ratings (on a scale of 1 to 10 with 1 = Poor and 10 = Excellent). To understand the level of service quality, which includes the waiting times of the customers in the checkout section, he collected data on 100 customers who visited the store; see the attached Excel file: ServiceQuality. 1. Using Data Mining > Cluster, apply K-Means Clustering with the following Selected Variables: Wait Time (min), Purchase Amount ($), Customer Age, and Customer Satisfaction Rating. In Step 2 of the k-Means Clustering procedure, normalize (standardize) input data, assume k = 5 clusters, 50 iterations, and Fixed start with the default Centroid Initialization seed of 12345. In Step 3, select the checkboxes “Show data summary” and “Show distances from each cluster center”. a. What is the most homogenous cluster? What is the number of customers in this cluster? For this cluster, what is the average standardized Euclidean distance between its observations and its centroid (center)? What is the centroid of this cluster (expressed in standardized data)? Using the cluster centroids, how would you characterize the customers in the most homogenous cluster in comparison with the customers in the remaining clusters? b. Which two clusters are most distinct and why? Using their centroids, how would you compare the customers of the two clusters? 2. Using Data Mining > Cluster, apply Hierarchical Clustering with the following Selected Variables: Wait Time (min), Purchase Amount ($), Customer Age, and Customer Satisfaction Rating. In Step 2 of the Hierarchical Clustering procedure, normalize (standardize) input data and apply Ward’s clustering method, while in Step 3, select the checkboxes “Show dendrogram”, “Show Cluster Membership”, and assume k = 5 clusters. a. Show the obtained dendrogram. b. What are the sizes of the created clusters? c. What are the centroids of the created clusters expressed in original data. Hint: To answer Questions 2b and 2c, in the worksheet HC_Clusters, you may first add the four columns with original data, and sort the column Cluster by clicking Data in the Ribbon and selecting . Then you can easily find the cluster sizes, and the four variable averages characterizing each cluster. 3. Based on your findings, what reasons do you see for low customer satisfaction ratings? Provide some recommendations for improving customer satisfaction. Write a managerial report in MS Word; do not attach any separate Data Mining and/or Excel outputs. Instead paste into your report the Data Mining outputs with answers to Questions in Tasks 1 and 2a, and Excel results related to Tasks 2b and 2c. Showing these outputs/results is crucial because without them I will not be able to verify your answers. Note 1. The use of other software is unacceptable! Note 2. To better prepare for the assignment, study the clustering example KTC in the slides, and the questions on Exhibit 4.4 in Test Bank.

In: Statistics and Probability

In JAVA!!! write a method called Comparisons that will return the number of comparisons to find...

In JAVA!!!

write a method called Comparisons that will return the number of comparisons to find an element in the tree. The main program calls this method for each element, adding the comparisons each time in order to count the total number of comparisons. The program then outputs the total number of comparisons and the average number. You may use the program BuildTreeWIthMethod to build your tree. Then, after you have made the call to inOrder(root), add the following code:

int totalComparisons=0;

for (int i = 0; i < arr.length; i++) {
totalComparisons=totalComparisons + Comparisons(root, arr[i]);
}

System.out.println("Number of comparisons to find all data in tree is " + totalComparisons);
System.out.println("Average number of comparisons is " + totalComparisons*1.0/arr.length);

To be clear: you ONLY have to write the method and to put the code above into your program - use the program I gave to you.

2. Repeat the above for strings in an input file. The input file is here. words2.txt

In each case work the tree by hand (pencil and paper) so you know what the answer should be. You can EITHER submit two programs OR put both into one program. Your choice.

FOR THIS LAB it is OK if you have to write two TreeInsert methods (one for Integer, one for Strings), and two Comparisons methods (you can write template methods in the next lab) - but if you put template methods in here that is good too. ALSO the integers are in an array, but the Strings are in a file. So after you have built a tree of Strings you either have to close the input file, then reopen it and pick up each word again and calculate the number of comparisonsto find it, or you have to look for another solution. (Possibilities are to read them into an array at the beginning before building your tree or count comparisons in the same loop where you read in your string. Either is fine (for now)).

words2.txt

Hi

Bye

Monday

April

Donkey

Yellow

Computers

Monkey

Dog

Cat

BuildTreeWithMethod

public class BuildTreeWithMethod {

public static void main(String[] args) {
  
Integer[] arr = {6, 8, 3, 4, 9, 2 }; //data to put in BST
  
BinaryTreeNode<Integer> root=new BinaryTreeNode<Integer>(arr[0]);//the root

//build the tree
for (int i = 1; i < arr.length; i++) {
  
TreeInsert(root, arr[i]);

}
//print out the data - should be sorted
inOrder(root);

}
//method to perform- an inorder traversal of a BST
public static void inOrder(BinaryTreeNode t) {
if (t != null)
{
inOrder(t.getLeft());
System.out.println(t.getValue());
inOrder(t.getRight());

}
}
  
//method to insert an integer (num) into a non-null BST tree
public static void TreeInsert(BinaryTreeNode root, Integer num)
{ BinaryTreeNode b=new BinaryTreeNode(num);
BinaryTreeNode curr=root;
while (curr != null) {
int currValue= (int)curr.getValue();
if(num<currValue){
if (curr.getLeft() == null) {
curr.setLeft(b);
  
break;
} else {
curr = curr.getLeft();
  
}

} else {
if (curr.getRight() == null) {
curr.setRight(b);

break;
} else {
curr = curr.getRight();

}
}
}
  

}
  
}

In: Computer Science

5. The main difference between perfect competition and monopolistic competition is: A) the size of the...

5. The main difference between perfect competition and monopolistic competition is: A) the size of the firms B) the technology used in production C) the features of the product or service are similar, but not identical D) there is only one firm producing the product, but many buyers

6. Public good are: A) rival and excludable B) non-rival and non-excludable C) rival and non-excludable D) non-rival and excludable

7. An example of a public good is a A) rhinoceros that is almost extinct B) hospital health care C) the creation of Pre. Trump of the Space Force D) All are public goods

8. If a government does not establish a rule of law, markets generally are inefficient due to the lack of we---defined: A) natural resources B) property rights C) licenses D) work hours

9. A firm’s LRAC curve keeps going down. This indicates the existence of:

a) specialization b) economies of scale c) diseconomies of scale d) diminishing returns

10. If the marginal product of labor is 4 units per hour and the marginal product of capital is 8 units per hour and labor costs $20 per hour and capital costs $35 per hour, this firm should use: A) more capital

B) more labor C) more capital and labor D) impossible to answer from the information given

11. The founder of economics wrote_________________in _________.

a) The Greatest Gift, 1542 b) My Puppy, My Life, 1924 c) The Wealth of Nations 1776 d) Wealth, Poverty, and Equality, 1848

12. Another word for ATC is a) overhead costs per unit b) production costs per unit C) average unit costs d) trigger costs

13. Profits are the same as: A) TR B) TB C) TR – TC D) none of the above

14. Average variable costs are minimized at their intersection with A) VCs B) TCs C) ATCs D0 MCs

15. At a quantity of zero production: A) A firm’s total costs will be zero B) A firm’s variable costs will be zero C) A firm’s fixed costs will be zero. D) none of the above are correct

16. In the long run, if a firm’s output doubles and its unit costs triple, this is an example of:

A) economies of scale B) diminishing returns to scale c) diseconomies of scale D) constant scale

17. The biggest problem stopping private firm from offering an adequate supply of public goods is; A) free-ridership B) tragedy of the commons C) the sword of Hercules D) bifurcation

18. If there are positive externalities created by a market, the market will give you A) too little quantity and too low a price B) too high quantity at too low a price c) too low quantity at too high a price.

D) too high a quantity at too high a price

19. Markets may not always be sufficient solution due to: a) lack of competition B) insufficient information C)the public goods problem D) all the above are possibilities

20. The yeti, sasquatch, and Big Foot may all have evolved from a common ancestor such as

A) Gigantopithecus B) Plesiosaurs C) Tasmanian Devils D) Pterodactyls

In: Economics

Fatima Hassan is responsible for the collection, and auditing services of clients' accounts for the Doha...

Fatima Hassan is responsible for the collection, and auditing services of clients' accounts for the Doha Audit Office. Has been commissioned With a new client, Al Wajba Consulting Services Company, which contracted with the Doha Audit Office recently. Company CEO It is Mr. Ali Mahmoud, who monitors all operating activities of the company and takes all major decisions. Never use this company Previously, any services from the audit office. In addition to preparing the financial statements, the Doha Audit Office will handle the related matters Company taxes. On her first visit to the company, Fatima Hassan met Hala Abdullah, she was recently hired as an accountant and is still a student. Accounting last year at a local university. At a later meeting, Hala assured Fatma that she had found the job at the beginning of the class Scholastic after extensive research. She needs money to help fund her studies at university and feels lucky to have found A well-paid job during this current phase of the economic downturn due to the COVID-19 pandemic. Hala felt that Fatima was someone she could talk to and get advice from. Hala spoke of a situation she had in mind Some time ago. Hala concerns dealing with sales revenue. When the proceeds from sales are collected and deposited on a weekly basis, the necessary report is filled out with the most accurate categories of payment: cash, checks or credit cards. Distance Depositing the total amount on a weekly basis, Mr. Ali Mahmoud prepares a report after adjusting the total amount deposited by His own vision. After looking at some of the weekly deposits, Hala noticed that 20,000 Qatari cash were missing from each Deposit process. After a more comprehensive examination of the monthly tax documents that Mr. Ali filled out, Hala notes that the total income is the monthly amount reported to the Tax Authority is QR 80,000 less than the amount actually calculated. Professor Ali He is the only person to deal with the funds after they have been pooled. It is also the only person who deposits money on a weekly basis. When Hala asked Mr. Ali about the non-reporting of these unreported revenues, Mr. Ali replied that it was being done for tax purposes. It is believed that the auditor will accept this procedure because the fees of the Doha Audit Office are to implement Audit tasks and other tax services are paid by Al Wajba Consulting Services.

Study requirements: Each student must answer the following questions but each question should be answered at least 120 word for each question:

3. What are the alternatives available to Hala Abdullah, Fatima Hassan, and Professor Ali Mahmoud?

4. For each alternative dealt with in Requirement (3), are the net benefits exceeding the net losses for all the owners? Discuss your interpretation clearly

5. Whose rights will be violated in every alternative dealt with in Question 3? Discuss your interpretation clearly

can you answer number question number 5

In: Accounting

International econ V. specific factor model The country of Riclo produces two products: Cloth and Rice....

International econ V. specific factor model The country of Riclo produces two products: Cloth and Rice. Cloth requires both Capital and Labor to produce. Rice requires both Land and Labor to produce. Riclo has perfectly competitive markets for Labor, Cloth and Rice. Riclo has 100 units of Capital, and all the Capital is used for Cloth production. Riclo has 200 units of Land, and all the Land is used for Rice production. Riclo has 1000 units of Labor, and each worker can work equally well in either Cloth or Rice production; therefore each worker will work in whichever industry pays higher wages. Since all Capital is allocated to Cloth and all Land is allocated to Rice, the production functions for each industry only depend on the quantity of Labor dedicated to that industry. The production function for Cloth is QC=20LC This means that the Marginal Product of Labor in Cloth is MPLC=10LC The production function for Rice is QR=50LR This means that the Marginal Product of Labor in Rice is MPLR=25LR You can take our word for it that these Marginal Products are correct. You do not need to use calculus to verify the equations. In Autarky the Price of Cloth is $10 and the Price of Rice is $12. You do not need to be mathematically precise on your graphs as long as the general shapes and slopes are correct. You do need to label your axes correctly. You also need to label all important points on the graph with numbers on the axes. You should draw a dotted line from the point on the graph to the number on the axis. Round all quantities to the nearest whole number, including quantities of Labor. Round all prices, wages and returns to two decimal places. Relative Prices, Relative Quantities and Slopes can be left as fractions, or they can be expressed as decimals rounded to two decimal places. Now, assume that Riclo starts to trade with the rest of the world. Assume that Relative Demand remains unchanged (that is, the World Relative Demand Curve for Cloth and Rice is the same as the Riclo Domestic Relative Demand Curve for Cloth and Rice). But the World Relative Supply Curve is different from the Riclo Relative Supply Curve, and results in a higher Relative Price of Cloth. With Free Trade, the new Price of Cloth is $20 and the Price of Rice remains at $12. Assume Free Trade for all parts of this question. Show your work for all parts of this question. Do not just write down a number. The problem continues on the next page. Calculate the quantity of Labor used in each industry in Riclo. Calculate the Quantity produced in Riclo in each industry. Calculate the equilibrium Nominal Wage in Riclo. Explain in general terms the conditions under which workers in Riclo might be better off due to Free Trade and the conditions under which the workers in Riclo might be worse off due to Free Trade. Calculate the Return to each unit of Capital in Riclo under Free Trade. Are owners of Capital in Riclo better off or worse off with Free Trade compared to Autarky?

In: Economics