Print three outputs corresponding to three tests that are based on different proposed bar sizes, such as a small bar (25 seats), a medium sized bar (60 seats) and a big bar (100 seats).
CSMSoftwareGurusBar.java
public class CSMSoftwareGurusBar {
private int freeChairs = 50;
private double profit = 0.0;
private SimulationFramework simulation = new SimulationFramework();
private int[] beerType = {100, 60, 25};
public static void main(String[] args) {
CSMSoftwareGurusBar world = new CSMSoftwareGurusBar();
System.out.println(world.beerType.length);
CSMSoftwareGurusBar world2 = new CSMSoftwareGurusBar();
System.out.println(world2);
CSMSoftwareGurusBar world3 = new CSMSoftwareGurusBar();
}
CSMSoftwareGurusBar() {
int t = 0;
while (t < 240) { // simulate 4 hours of bar operation
t += randBetween(2, 5); // new group every 2-5 minutes
if (t <= 240)
simulation.scheduleEvent(new ArriveEvent(t, randBetween(1, 5)));
} // group size ranges from 1 to 5
simulation.run();
System.out.println("Total profits " + profit);
}
private int randBetween(int low, int high) {
return low + (int) ((high - low + 1) * Math.random());
}
public boolean canSeat(int numberOfPeople) {
System.out.println("Group of " + numberOfPeople
+ " customers arrives at time " + simulation.time());
if (numberOfPeople < freeChairs) {
System.out.println("Group is seated");
freeChairs -= numberOfPeople;
return true;
} else
System.out.println("No Room, Group Leaves");
return false;
}
private void order(int beerType) {
System.out.println("Serviced order for beer type " + beerType
+ " at time " + simulation.time());
// update profit knowing beerType (left for you)
profit += beerType + 1;
}
private void leave(int numberOfPeople) {
System.out.println("Group of size " + numberOfPeople
+ " leaves at time " + simulation.time());
freeChairs += numberOfPeople;
}
private class ArriveEvent extends Event {
private int groupSize;
ArriveEvent(int time, int gs){
super(time);
groupSize = gs;
}
public void processEvent(){
if (canSeat(groupSize)){
// place an order within 2 & 10 minutes
simulation.scheduleEvent (new OrderEvent(time + randBetween(2,10), groupSize));
}
}
}
private class OrderEvent extends Event {
private int groupSize;
OrderEvent(int time, int gs) {
super(time);
groupSize = gs;
}
public void processEvent() {
// each member of the group orders a beer (type 1,2,3)
for (int i = 0; i < groupSize; i++) {
order(1 + simulation.weightedProbability(beerType));
order(2 + simulation.weightedProbability(beerType));
order(3 + simulation.weightedProbability(beerType));
// schedule a leaveEvent for this group
// all the group leaves together (left for you)
simulation.scheduleEvent(new LeaveEvent(time + randBetween(30, 60), groupSize));
}
}
}
private class LeaveEvent extends Event {
LeaveEvent(int time, int gs) {
super(time);
groupSize = gs;
}
private int groupSize;
public void processEvent() {
leave(groupSize);
}
}
}
SimulationFrameWork.java
public class SimulationFramework {
public void scheduleEvent(Event newEvent) {
// put or addElement “newEvent” to the “eventQueue”
// MinHeap Priority Queue (left for you)
eventQueue.addElement(newEvent);
}
public void run () {
while (! eventQueue.isEmpty()) {
Event nextEvent = (Event) eventQueue.removeMin();
currentTime = nextEvent.time;
nextEvent.processEvent();
}
}
public int time() {
return currentTime;
}
private int currentTime = 0;
private FindMin eventQueue = new Heap(new DefaultComparator());
public int weightedProbability(int[] beerType){
int sumOfArray = 0;
for (int i=0; i < beerType.length; i++){
sumOfArray += beerType[i];
}
int probability = 1 + (int) ((sumOfArray) * Math.random());
if (probability <= 15){
return 0;
}
else if (probability <= 75){
return 1;
}
else{
return 2;
}
}
private class FindMin {
public Object removeMin() {
return currentTime ;
}
public boolean isEmpty() {
return true;
}
public void addElement(Event newEvent) {
System.out.println(newEvent);
}
}
private class Heap extends FindMin {
public Heap(DefaultComparator defaultComparator) {
super();
}
}
}
Event.java
public abstract class Event implements Comparable {
public final int time;
public Event (int t) {
time = t;
}
abstract void processEvent ();
public int compareTo (Object o) {
Event right = (Event) o;
if (time < right.time) {
return -1;
}
if (time == right.time){
return 0;
}
return 1;
}
}
DefaultComparator.java
public class DefaultComparator implements java.util.Comparator {
public int compare(java.lang.Object left, java.lang.Object right) {
Event i = (Event) left;
Event j = (Event) right;
if (i.time > j.time){
return 1;
}
else if (i.time < j.time){
return -1;
}
else{
return 0;
}
}
public boolean equals(java.lang.Object obj){
return this.equals(obj);
}
}In: Computer Science
Step 1: Carefully read the following brief case study.
Bernice was hesitant during her initial counseling session because she feared what the therapist would think of her. The therapist focused on building a therapeutic alliance with Bernice by engaging in empathic, nonjudgmental listening. Soon, Bernice shared that she feared contamination. She was particularly upset by touching wood, mail, and canned goods. She also disliked touching silver flecks. By silver flecks, Bernice meant silver embossing on greeting cards, eyeglass frames, shiny appliances, and silverware. She was unable to state why these particular objects were special sources of possible contamination. Bernice became more distressed during the session, and she started sharing what made her come for counseling. Bernice shared that disturbing images pop in her mind, and the images are mind’s eye pictures of her “worst fear.” The images are so disturbing to Bernice that she showed marked distress when talking about them. She explained that the images were in regards to her child, “The person I love most in the world and would do anything to protect.”
Bernice explained that she feels compelled to do specific behaviors to try to reduce her distress. Bernice engages in a variety of rituals that, when taken together, take up much of her day. In the morning, she spends hours washing and rewashing. Between each bath she has to scrape away the outer layer of her bar of soap so that it will be free of germs. Bernice said that although the decontamination rituals are tiresome, the rituals she does to protect her child from harm are so detailed that Bernice has to repeat them several times to get them “right.” She said that she feels a sense of urgency to do the rituals perfectly to protect her child.
Step 2: Based on the Bernice Case Study, identify the most relevant psychological disorder associated with her symptoms and explain your rationale.
(Hint: Bernice does *not* have a specific phobia; she does not have “fear of germs.”)
Step 3: In your own words, explain what you have learned from the assigned readings about the psychological disorder you identified for the Bernice Case Study.
Step 4: You will need to select at least *one* academic journal article that explains one treatment approach used for the psychological disorder you identified for the Bernice Case Study. To conduct your research on the treatment approach, please use one of the following methods:
You can search the following: Monitor on Psychology (webpage, opens in a new tab). In the search box, type the disorder you identified. Then, you can locate an article about a treatment approach.
You can also search the PsychArticles Database, which you can access using the following steps. First click on: SPC's LibraryOnline (webpage, opens in a new tab). Then, click "Search Online." Next, click "Databases by Subject." Next to "Social Sciences," click PsychArticles. In the search box, type the disorder you identified. Then, you can locate an article about a treatment approach.
You can also search Google Scholar (webpage, opens in a new tab). Google Scholar only provides an abstract, which is a summary. After you locate an abstract on Google Scholar, you will need to locate the full article onSPC's LibraryOnline (webpage, opens in a new tab).
In your own words, summarize the treatment approach you identified from the research you conducted. Please avoid quoting the academic journal; instead, describe the treatment approach with depth and in your own words. Use APA style for in-text and reference page citations.
Step 5: Review the grading rubric (webpage, opens in new tab), which explains the expectations for your writing assignment.
Step 6: Submit your responses to Steps 2, 3, and 4 in the drop box. Please save your responses in PDF format or in RTF format if you are not using Word.
Step 7: After the writing assignment is graded, please access your rubric and feedback. The steps to do so are explained here: https://mycoursessupport.spcollege.edu/dropbox-rubrics (webpage, opens in a new tab).
In: Psychology
Inheritance – Address, PersonAddress, BusinessAddress Classes
Assignment
Download the Lab6.zip starter file. Use 7zip to unzip the file using ‘Extract Here’. Open the project folder in IntelliJ.
Examine the Main and Address classes. You are going to add two classes derived from Address: BusinessAddress and PersonAddress.
Create BusinessAddress class
The printLabel method should print (using System.out.println()) // Here is the 1st place I'm getting stuck ?? All I did was create the BusinessAddress class. I appreciate your assistance
First line – the businessName field
Second line – the address2 field if it is not null or empty
Third line – the StreetAddress field if it is not null or empty
Fourth line – city field followed by a comma and space, the state field followed by two spaces, and the zip field
Create PersonAddress class
The printLabel method should print (using System.out.println())
First line – the personName field
Second line – the StreetAddress field
Third line – city field followed by a comma and space, the state field followed by two spaces, and the zip field
Modify Main class
Add the following three BusinessAddress objects to the list.
|
BusinessName |
Address2 |
StreetAddress |
City |
State |
Zip |
|
Columbus State |
Eibling 302B |
550 East Spring St. |
Columbus |
OH |
43215 |
|
AEP |
P.O. Box 2075 |
null |
Columbus |
OH |
43201 |
|
Bill’s Coffee |
null |
2079 N. Main St. |
Columbus |
OH |
43227 |
Add the following three PersonAddress objects to the list.
|
PersonName |
StreetAddress |
City |
State |
Zip |
|
Saul Goodman |
1200 N. Fourth St. |
Worthington |
OH |
43217 |
|
Mike Ehrmentraut |
207 Main St. |
Reynoldsburg |
OH |
43211 |
|
Gustavo Fring |
2091 Elm St. |
Pickerington |
OH |
43191 |
Example Output
Columbus State
Eibling 302B
550 East Spring St.
Columbus, OH 43215
====================
AEP
P.O. Box 2075
Columbus, OH 43201
====================
Bill's Coffee
2079 N. Main St.
Columbus, OH 43227
====================
Saul Goodman
1200 N. Fourth St.
Worthington, OH 43217
====================
Mike Ehrmentraut
207 Main St.
Reynoldsburg, OH 43211
====================
Gustavo Fring
2091 Elm St.
Pickerington, OH 43191
====================
public class Main {
public static void main(String[] args) {
Address[] addressList = new Address[6];
// TODO Add 3 person addresses to list
// TODO Add 3 business address to list
for (Address address : addressList) {
address.printLabel();
System.out.println("====================");
}
}
}
public abstract class Address {
private String streetAddress;
private String city;
private String state;
private String zip;
public Address(String streetAddress, String city, String state, String zip) {
this.streetAddress = streetAddress;
this.city = city;
this.state = state;
this.zip = zip;
}
public String getStreetAddress() {
return streetAddress;
}
public void setStreetAddress(String streetAddress) {
this.streetAddress = streetAddress;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public String getState() {
return state;
}
public void setState(String state) {
this.state = state;
}
public String getZip() {
return zip;
}
public void setZip(String zip) {
this.zip = zip;
}
public String toString() {
return streetAddress + "\n" +
city + ", " + state + " " + zip + "\n";
}
public abstract void printLabel();
}
public class BusinessAddress extends Address {
private String businessName;
private String address2;
public BusinessAddress(String streetAddress, String city, String state, String zip, String businessName, String address2) {
super(streetAddress, city, state, zip);
this.businessName = businessName;
this.address2 = address2;
}
public String getBusinessName() {
return businessName;
}
public void setBusinessName(String businessName) {
this.businessName = businessName;
}
public String getAddress2() {
return address2;
}
public void setAddress2(String address2) {
this.address2 = address2;
}
public void printLabel() {
}
}
In: Computer Science
43.Which of the following statements about determinants of sexual orientation is true? a.Sons become homosexual when raised by a domineering mother and a weak father. b.Children raised by homosexual and lesbian parents usually end up adopting their parents' sexual orientation. c.Homosexual and lesbian adults were, as children, seduced by an older person of their sex. c.Biology plays an important role in determining a person's sexual orientation. 44.Date rape is least likely to occur when a.the woman has a clear and consistent sexual policy. b..the individuals involved have traditional sex-role orientations. c..the couple has previously had sex. d..the woman reasons with the man but does not struggle or scream. 45.Steve has always enjoyed sports, is going to college on a basketball scholarship, and now thinks he might want to have a career in coaching. He has talked with his high school and college coaches about the opportunities available at different levels. Steve liked working with high school students at summer basketball camps, and he decided to major in education in order to be prepared to teach and coach at the high school level. Steve is in Super's phase of career development. a.specification b.crystallization c.establishment d.implementation 46.Sarah is task-oriented and enjoys thinking about abstract relations. She would best be described as having a(n) personality type. a.realistic b.enterprising conventional d,investigative 47.When students work over 15 hours a week during the school year, a.they learn good work habits and usually get better grades than students who do not work. b.they spend less time studying and tend to get lower grades than students who do not work. c.their grades are not usually affected, either positively or negatively. d.boys' grades tend to suffer but girls' grades tend to improve 48..Which of the following substances is most likely to be used by adolescents? a.marijuana b.cocaine c.amphetamines d.alcohol 49.Depression a.is associated with increased levels of norepinephrine and serotonin. b.is more common in males than in females. c.can be triggered by feelings of learned helplessness. d..cannot be treated successfully 50.Which of the teenagers described below is most at risk for becoming a juvenile delinquent? a.Jared, who is from a middle-class environment and wants the best electronic equipment he can find. b.Lyle, whose mother is always home after school because she doesn't trust Lyle to stay home alone. c.Wayne, whose parents consistently discipline him whenever he breaks a house rule, which is at least once a week. d.Jake, who is very impulsive and tends to act before he thinks.
In: Psychology
SECTION A: CASE STUDY
QUESTION 1
This is an extract describing a fashion house noted for custom-made
gowns in Ghana. Use the case information to answer the questions
that follow. Pistis is a Ghanaian based fashion house headquartered
in Accra. The company currently stands at the frontline of the fast
growing African fashion industry while making major strides on the
international markets. Pistis, at the core, prides itself on
creating master pieces for every client and, as result, has
garnered a name as the leader in special occasion clothes. From
their unique hand beaded bridal gowns to their creative use of
African fabrics such as kente, the brand aims at making every woman
standout as royalty in a Pistis gown. All clothing are specially
made to order and the organisation does not stock clothing. There
are minimum slots per month for the clothes that can be made so its
best to confirm an order when you are certain with the dates to
start the process. The organisation has only one facility in Ghana
but has a website where orders can be placed online. Pisits was
started in 2008 by Kabutey and Sumaya right after graduating from
Vogue Style School of School and Design in Accra, Ghana. The brand
was founded on a common vision of uniquely providing the perfect
fit and style to a fast evolving woman who exuberates ambition,
reveres culture and embraces innovation. By acknowledging the
demand in the growing African and global market, the brand, through
the years, has grown expediently by focusing on providing customers
with the best service through rigorous product development in
regard to originality and quality. Pistis has been featured in
various shows such as the Runway Dubai Season III, Glitz Africa
Fashion Week 2013, Radiance Bridal Show and headlining 3 seasons of
the Vlisco Fashion Show in Ghana. In addition, Pistis has had the
opportunity to dress the finalists for the Miss Malaika Pageant
Ghana for 2012, 2013, and 2014 seasons. Through the years, Pistis
has had the opportunity to dress dignitaries, celebrities,
corporate executives, religious leaders and most importantly, the
hardworking everyday woman.
a. If a key need of the customer segment the organisation aims to
fill is increase rate of innovation, how would the key customer
need identified influence the implied demand uncertainty? (3 Mark)
b. Which capabilities of responsiveness (mention 2) does the
organisation’s supply chain possess (use information from the case
to explain why)? c. How can the organisation use the
pricing driver to a. Match supply and demand b. Increase
responsiveness c. Increase efficiency?
SECTION B: APPLICATION QUESTION 2
ADJ Company Limited is an organisation that deals in the
manufacturing of bespoke cars in Ghana. Its cars are held by
distributors/retailers in intermediate warehouses and package
carriers are used to transport the cars from the intermediate
location to the final customer.
As an expert in supply chain management, you are to analyse the
operations of the company and submit a report detailing the
following to management of the company:
a. Indicate the distribution design in use
b. An evaluation of the performance of the current distribution
network compared to Manufacturer Storage with Direct Shipping
(compare along 4 dimensions).
c. The types of customers and products (mention 2 each) which are
more suited to the type of distribution design being used by the
company than retail storage with customer pickup and why?
SECTION C: ESSAY TYPE QUESTION 3
The Internet has affected the structure and performance of various
distribution networks in a supply chain. Using the case of Jumia or
other relevant example state and critically discuss how online
sales impacts on a supply chain’s ability to meet customer needs
(discuss 4 elements)
In: Operations Management
In: Nursing
You are an Audit Senior on the AUDIO Health Limited (AUDIO) audit engagement for the financial year ending 30 June 2019. AUDIO specialises in the design and manufacture of implantable hearing aids and invests more than twice the industry average in research and development. While undertaking audit planning procedures you become aware of the following: AUDIO has been developing its latest hearing implant, the X5, for a number of years. AUDIO has invested heavily in research and development of the X5 and has capitalised a significant amount in relation to the development phase of the product. Market studies and prototypes of the X5 have proved successful for bringing it to the market. In July 2018, AUDIO acquired two technologically advanced machines specifically designed for manufacturing the X5, at a cost of $15 million each. Production and sales of the X5 hearing implant commenced in October 2018, and demand for the product has been extremely high since its launch. AUDIO has sold large volumes of the product and further manufactured a large stockpile of the X5 in anticipation of on-going high demand, and a substantial number have already been implanted in patients. There has recently been a sharp increase in incidences of the implant shutting down postsurgery, resulting in a number of patients commencing legal action against AUDIO for damages and prompting the company to initiate a recall. Initial investigations reveal that the defect is attributable to a design flaw. It is likely that the product in its current form cannot be sold. Management of AUDIO is confident that it will be possible to re-engineer the two machines acquired for the manufacturing of the X5 to enable production of its four other product lines and potentially for other products currently under development. You have raised concerns with AUDIO’s audit committee on improving the competence and objectivity of the internal audit department. Currently, the internal audit department is made up of three recent graduates with no prior experience who periodically report the Audio’s Chief Executive Officer Dr. Dave Bautista. Required: Prepare a memorandum to the audit manager, outlining your risk assessment relating to AUDIO Limited. When making your risk assessment:
(a) Identify three (3) key account balances from the information provided that are subjected to an increase in audit risk. Briefly explain what factors increase the audit risk associated with the three (3) accounts identified. In your explanation, please mention the key assertion(s) at risk of material misstatement.
(b) Identify how the audit plan will be affected and recommend specific audit procedures to address the risks associated with each account identified.
In: Accounting
Case Study (Part 2) – ACCT 3000 Semester 2, 2020
You are an Audit Senior on the AUDIO Health Limited (AUDIO) audit
engagement for the financial year ending 30 June 2019. AUDIO
specialises in the design and manufacture of implantable hearing
aids and invests more than twice the industry average in research
and development. While undertaking audit planning procedures you
become aware of the following:
AUDIO has been developing its latest hearing implant, the X5, for a
number of years. AUDIO has invested heavily in research and
development of the X5 and has capitalised a significant amount in
relation to the development phase of the product. Market studies
and prototypes of the X5 have proved successful for bringing it to
the market. In July 2018, AUDIO acquired two technologically
advanced machines specifically designed for manufacturing the X5,
at a cost of $15 million each. Production and sales of the X5
hearing implant commenced in October 2018, and demand for the
product has been extremely high since its launch. AUDIO has sold
large volumes of the product and further manufactured a large
stockpile of the X5 in anticipation of on-going high demand, and a
substantial number have already been implanted in patients.
There has recently been a sharp increase in incidences of the
implant shutting down post-surgery, resulting in a number of
patients commencing legal action against AUDIO for damages and
prompting the company to initiate a recall. Initial investigations
reveal that the defect is attributable to a design flaw. It is
likely that the product in its current form cannot be sold.
Management of AUDIO is confident that it will be possible to
re-engineer the two machines acquired for the manufacturing of the
X5 to enable production of its four other product lines and
potentially for other products currently under development.
You have raised concerns with AUDIO’s audit committee on improving
the competence and objectivity of the internal audit department.
Currently, the internal audit department is made up of three recent
graduates with no prior experience who periodically report the
Audio’s Chief Executive Officer Dr. Dave Bautista.
Required:
Prepare a memorandum to the audit manager, outlining your risk
assessment relating to AUDIO Limited. When making your risk
assessment:
(a) Identify three (3) key account balances from the information
provided that are subjected to an increase in audit risk. Briefly
explain what factors increase the audit risk associated with the
three (3) accounts identified. In your explanation, please mention
the key assertion(s) at risk of material misstatement.
(b) Identify how the audit plan will be affected and recommend
specific audit procedures to address the risks associated with each
account identified.
(Please Note – Maximum Word Limit: 950 Words)
In: Accounting
Projected Operating Assets
Berman & Jaccor Corporation's current sales and partial balance sheet are shown below.
| This year | ||||
| Sales | $ | 1,000 | ||
| Balance Sheet: Assets | ||||
| Cash | $ | 100 | ||
| Short-term investments | $ | 75 | ||
| Accounts receivable | $ | 300 | ||
| Inventories | $ | 150 | ||
| Total current assets | $ | 625 | ||
| Net fixed assets | $ | 400 | ||
| Total assets | $ | 1,025 | ||
Sales are expected to grow by 12% next year. Assuming no change in operations from this year to next year, what are the projected total operating assets? Do not round intermediate calculations. Round your answer to the nearest dollar.
$
In: Finance
Towne, Inc., a calendar year S corporation, holds AAA of $627,050 at the beginning of the tax year. 2018 During the year, the following items occur.
Sales income | $216,000 |
Loss from real estate operations | (4,000) |
Officers’ life insurance proceeds | 100,000 |
Premiums paid for officers’ life insurance | (3,600) |
Dividend income | 17,000 |
Interest income | 3,000 |
Charitable contributions | (22,000) |
§ 179 depreciation expense | (2,500) |
Administrative expenses | (35,000) |
Cash distributions to shareholders | (73,220) |
Calculate Towne’s ending AAA balance.
In: Accounting