Questions
An ideal vapor-compression refrigeration cycle is modified to include a counterflow heat exchanger, as shown in...

An ideal vapor-compression refrigeration cycle is modified to include a counterflow heat exchanger, as shown in the figure below. Ammonia leaves the evaporator as saturated vapor at 1 bar and is heated at constant pressure to 5°C before entering the compressor. Following isentropic compression to 18 bar, the refrigerant passes through the condenser, exiting at 40°C, 18 bar. The liquid then passes through the heat exchanger, entering the expansion valve at 18 bar.



If the mass flow rate of refrigerant is 16 kg/min, determine:

(a) the refrigeration capacity, in tons of refrigeration.

(b) the compressor power input, in kW.

(c) the coefficient of performance.

(d) the rate of entropy production in the compressor, in kW/K.

(e) the rate of exergy destruction in the compressor, in kW.

Let T0 = 20°C

In: Mechanical Engineering

Program description is given below!! Client and Server Online Game Jumble: In this assignment, you need...

Program description is given below!!

Client and Server Online Game Jumble: In this assignment, you need to use socket programming to implement an online game Jumble. Generate a random work in server and send it to client and ask for input and then client send the guessed word to server and server check whether its in a word.txt file and reply Win or lose.

Note:

  • Reading content of a text file to a list and generating random number, and game logic is already implemented in jumble.py
  • ONLY need modification in echo-client.py and thread-server.py to implement socket programming.

Test your code and make sure the server can serve multiple players simultaneously. Note the words should be generated independently for each client, so that normally different clients are guessing different words

-----------------------Code--------------------

"""-----------------thread-server.py----------------------
Server side: open a socket on a port, listen for a message from a client,
and send an echo reply; echoes lines until eof when client closes socket;
spawns a thread to handle each client connection; threads share global
memory space with main thread; this is more portable than fork: threads
work on standard Windows systems, but process forks do not;
"""

import time, _thread as thread # or use threading.Thread().start()
from socket import * # get socket constructor and constants
myHost = '' # server machine, '' means local host
myPort = 50007 # listen on a non-reserved port number

sockobj = socket(AF_INET, SOCK_STREAM) # make a TCP socket object
sockobj.bind((myHost, myPort)) # bind it to server port number
sockobj.listen(5) # allow up to 5 pending connects

def now():
return time.ctime(time.time()) # current time on the server

def handleClient(connection): # in spawned thread: reply
time.sleep(5) # simulate a blocking activity
while True: # read, write a client socket
data = connection.recv(1024)
if not data: break
reply = 'Echo=>%s at %s' % (data, now())
connection.send(reply.encode())
connection.close()

def dispatcher(): # listen until process killed
while True: # wait for next connection,
connection, address = sockobj.accept() # pass to thread for service
print('Server connected by', address, end=' ')
print('at', now())
thread.start_new_thread(handleClient, (connection,))

dispatcher()

"""------------------echo-client.py-------------------------
Client side: use sockets to send data to the server, and print server's
reply to each message line; 'localhost' means that the server is running
on the same machine as the client, which lets us test client and server
on one machine; to test over the Internet, run a server on a remote
machine, and set serverHost or argv[1] to machine's domain name or IP addr;
Python sockets are a portable BSD socket interface, with object methods
for the standard socket calls available in the system's C library;
"""

import sys
from socket import * # portable socket interface plus constants
serverHost = 'localhost' # server name, or: 'starship.python.net'
serverPort = 50007 # non-reserved port used by the server

message = [b'Hello network world'] # default text to send to server
# requires bytes: b'' or str,encode()
if len(sys.argv) > 1:   
serverHost = sys.argv[1] # server from cmd line arg 1
if len(sys.argv) > 2: # text from cmd line args 2..n
message = (x.encode() for x in sys.argv[2:])

sockobj = socket(AF_INET, SOCK_STREAM) # make a TCP/IP socket object
sockobj.connect((serverHost, serverPort)) # connect to server machine + port

for line in message:
sockobj.send(line) # send line to server over socket
data = sockobj.recv(1024) # receive line from server: up to 1k
print('Client received:', data) # bytes are quoted, was `x`, repr(x)

sockobj.close() # close socket to send eof to server

--------------------------jumble.py----------------------

import random
F = open('wordlist.txt')
words = F.readlines()
F.close()
while True:
word = words[random.randrange(len(words))]
while len(word) > 5 or len(word) == 0:
word = words[random.randrange(0, len(words))]
word = word.rstrip()
old_word = word
word = list(word)
while word:
print(word.pop(random.randrange(len(word))), end = ' ')
print('\nType your answer')
match_word = input()
new_word = match_word + '\n'
if new_word in words and set(match_word) == set(old_word):
print('You win.')
else:
print('The answer is ' + old_word)

-------------------wordlist.txt---------------------

ab
aba
abaca
abacist
aback
abactinal
abacus
abaddon
abaft
abalienate
abalienation
abalone
abampere
abandon
abandoned
abandonment
abarticulation
abase
abased
abasement
abash
abashed
abashment
abasia
abasic
abate
abatement
abating
abatis
abatjour
abattis
abattoir
abaxial
abba

------------------------------------------------

Thank in advance! Please help me soon. I will UPVOTE!!

In: Computer Science

Please respond to the following article below: The Edges of Reason - The New York Times

Please respond to the following article below:

The Edges of Reason - The New York Times

In: Psychology

Case Summary Microsoft is the world’s largest supplier of computer software. It has dominant market share...

Case Summary

Microsoft is the world’s largest supplier of computer software. It has dominant market share of PC operating systems with its Windows system. High barriers to entry prevent significant competition in the operating systems market. The primary barrier is that a large number of software programs must be able to interface with any operating system to make it attractive to end users. It would be extremely difficult for any competitor to create a new operating system and create or encourage the creation of completely new software to compete with Windows. However, the development of Internet Browser programs, specifically Netscape, threatened this barrier, by allowing software developers to create software that could run using the browser software as a platform for the program. Therefore, software could be created that could still be used with Microsoft Windows, but would not have to be.

Microsoft recognized this development as a threat to its operating system monopoly. Initially Microsoft attempted to divide the market with Netscape, but Netscape refused. To defend its operating system, it set about to overtake Netscape with its own internet browser, Internet Explorer. To defeat Netscape, Microsoft leveraged its operating system monopoly to gain market share in the internet browser market.   Microsoft forced computer manufacturers to include Internet Explorer and strongly discouraged them from including competing browsers with the bundled software. It also leveraged its operating system power to encourage Online Service Providers (AOL, etc.), Internet Content Providers, and Internet Service Providers to use Internet Explorer and discourage them from making competing browsers available. The actions by Microsoft were effective in taking market share away from Netscape and protecting the Windows Operating System.

Discussion Questions

  1. What is the primary barrier to entry in the operating systems market? How does Netscape’s product threaten to remove this barrier?
  2. What is Microsoft’s pricing and distribution strategy for Internet Explorer? How does this compare to Netscape? Why would Microsoft pursue this pricing strategy?
  3. Is the internet browser software market a separate relevant product market from the operating system market?
  4. How does control of the start-up sequence and desktop screen allow Microsoft to leverage internet providers to use Internet Explorer? How effective was this strategy?

  1. What are some of the ways in which Microsoft’s actions adversely effect competition and innovation? Does this show evidence of harm to consumers?

In: Operations Management

Most vertebrates have testosterone, and have behaviors that are mediated by this hormone. Testosterone can be...

Most vertebrates have testosterone, and have behaviors that are mediated by this hormone. Testosterone can be helpful to animals, by enhancing (e.g.) territory acquisition, or harmful, by (e.g.) causing physiological stress. When male blackbirds are exposed to other male blackbirds, their testosterone levels change. In order to understand the impacts of testosterone on male blackbirds, researchers followed a few individual males, to monitor testosterone changes after encountering another male.   A pre-exposure measurement was made (in nanograms/deciliter) and a post-exposure measurement was taken, data below. Researchers will test the hypothesis that pre-exposure testosterone levels are the same as post-testosterone levels.

Before exposure

After exposure

105

85

50

74

136

145

90

86

122

148

132

148

131

150

119

142

145

151

130

113

116

118

119

99

138

150

(2 points) 1. Does this hypothesis test depend on a t distribution, a Z distribution, or a χ2 distribution?

(2 points) 2. What are the df for the test you will do?

(2 points) 3a. Is this a one-tailed, or a two-tailed test?

(2 points) 3b. How would you rephrase the hypothesis test to make it the other way (for instance, if you chose a one-tailed test in 3a, how would you re-phrase my original question to make it a two-tailed test?)

(2 points) 4. What is the hypothesized difference?

(2 points) 5. Calculate your test statistic here:

(2 points) 6. Do you reject or fail to reject the null hypothesis?

(2 points) 7. How would you articulate your conclusion to my grandmother, who would not like to hear about rejecting (or failing to reject) null hypotheses, but would be interested to know about blackbirds?

!!!!!!ANSWER ALL!!!!

In: Math

Define and discuss Porters’ Generic Strategies

Define and discuss Porters’ Generic Strategies

In: Operations Management

Marvel Parts, Inc., manufactures auto accessories. One of the company’s products is a set of seat...

Marvel Parts, Inc., manufactures auto accessories. One of the company’s products is a set of seat covers that can be adjusted to fit nearly any small car. The company has a standard cost system in use for all of its products. According to the standards that have been set for the seat covers, the factory should work 1,040 hours each month to produce 2,080 sets of covers. The standard costs associated with this level of production are: Total Per Set of Covers Direct materials $ 40,560 $ 19.50 Direct labor $ 7,280 3.50 Variable manufacturing overhead (based on direct labor-hours) $ 4,160 2.00 $ 25.00 During August, the factory worked only 600 direct labor-hours and produced 1,800 sets of covers. The following actual costs were recorded during the month: Total Per Set of Covers Direct materials (5,000 yards) $ 34,200 $ 19.00 Direct labor $ 6,660 3.70 Variable manufacturing overhead $ 4,140 2.30 $ 25.00 At standard, each set of covers should require 2.5 yards of material. All of the materials purchased during the month were used in production. Required: 1. Compute the materials price and quantity variances for August. 2. Compute the labor rate and efficiency variances for August. 3. Compute the variable overhead rate and efficiency variances for August.

In: Accounting

A paper company requires that the true median height of pine trees exceed 40 feet before...

A paper company requires that the true median height of pine trees exceed 40 feet before they are harvested. A penalty is assigned if the median height is less than 40 feet. The management wants to avoid this penalty. A sample of 24 trees in one large plot is selected, and 7 of them are over 40 feet. Conduct the appropriate hypothesis test to determine if the median height of pine trees in the plot is less than 40 feet. The estimated median is 35 feet. Do not assume normality. Let a = 0.05.

In: Math

Consider a B-tree allowing splits and free-on-empty. Please show an example of these operations on a...

Consider a B-tree allowing splits and free-on-empty. Please show an example of these operations on a data structure containing 15 data items, a fanout of three, and at most three data items per node. Also give the search algorithm (use a give-up scheme).

In: Computer Science

The ReservedRoom Class: Each ReservedRoom entry has three (data) fields: roomID (string) of the classroom e.g....

  1. The ReservedRoom Class:

Each ReservedRoom entry has three (data) fields:

  • roomID (string) of the classroom e.g. W330, W350, W361, etc.
  • courseID (string) which stores which course reserves this room
  • time (int): which stores the start time of the reserved slot i.e. 1820 means the reservation starts at 18:20

Thus, the ReservedRoom class will consist of three data members (roomID and courseID, time), in addition to the associated methods needed as follows.

  1. The constructor ReservedRoom (r, c, t): constructs a ReservedRoom object with the given parameters.
  2. String getRoom(): returns the roomID field.
  3. String getCourse(): returns the courseID field.
  4. int getTime(): returns the time field.
  5. String toString(): returns a String representation of this ReservedRoom entry.

Implement the ReservedRoom ADT using Java programming language.

The RoomsBoard Class:

RoomsBoard is a singly-linked list of ReservedRoom. The class RoomsBoard supports the following operations:

  1. void add(ReservedRoom r): adds a new ReservedRoom object to RoomsBoard. The ReservedRoom object should be inserted into the RoomsBoard list such that the nodes of the list appear in non-decreasing order of time.
  2. void remove(String roomID): removes all occurrences of the room with this ID.
  3. void remove_all_but(String roomID): removes all the reserved rooms except the room with this ID.
  4. void removeAll(): clears the RoomsBoard by removing all rooms entries.
  5. void split( RoomsBoard board1, RoomsBoard board2): splits the list into two lists, board1 stores the list of reserved rooms before 12:00 and board2 stores the list of rooms after 12:00.
  6. void listRooms(): prints a list of the reserved rooms in the roomsboard, in non-decreasing order.
  7. Void listReservations( roomID): prints the list of reservations for this room in the roomsboard, in non-decreasing order.
  8. int size(): returns the number of reserved rooms stored in the roomsboard.
  9. boolean isEmpty(): returns true if the RoomsBoard object is empty and false otherwise.

Implement the RoomsBoard ADT with a singly-linked list using Java programming language. The implementation must utilize the generic class Node as described in Section 3.2.1 of your text. Figure 1 shows a sample RoomsBoard object.

  1. The Menu-driven Program:

Write a menu-driven program to implement a roomsboard for a classroom reservations system. The menu includes the following options:

  1. Add new room.
    The program will prompt the user to enter the roomID, courseID and time of the new reserved room, then will call the add() method from the RoomsBoard class.
  2. Remove all occurrences of a room.
    The program will prompt the user to input the room ID to be removed, then call the remove() method from the RoomsBoard class.
  3. Remove all rooms except a room.
    The program will prompt the user to input the room ID to be kept, then call the remove_all_but () method from the RoomsBoard class.
  4. Clear the RoomsBoard.

The program will call the removeAll() method from the RoomsBoard class.

  1. Split the list of rooms into two lists by calling the method split() from the RoomsBoard class.
  2. Display RoomsBoard.
    The program will call the listRooms() method from the RoomsBoard class.
  3. Display the reservations of a room.
    The program will call the listReservations() method from the RoomsBoard class to display all reservations of this room with the given roomID.
  4. Exit.

The program should handle special cases and incorrect input, and terminate safely. Examples include (but not limited to) the following:

  1. Removing a RoomsEntry object from an empty RoomsBoard object.
  2. Removing a ReservedRoom object with a roomID that is not in the RoomsBoard object.
  3. Displaying an empty RoomsBoard object.
  4. Entering an incorrect menu option.

In: Computer Science

A fundamental building block in human resource management is job analysis. 1.) Describe what is meant...

A fundamental building block in human resource management is job analysis. 1.) Describe what is meant by job analysis. 2.) Describe how job analysis is used to develop human resource management programs. 3.) What are major arguments for job analysis? What are major criticisms of job analysis?

In: Operations Management

What kind of network management protocols are available? What information can these protocols provide? Explain it...

What kind of network management protocols are available? What information can these protocols provide? Explain it with example.

In: Computer Science

Which of the following statements is correct? a. sigma subscript x with bar on top end...

Which of the following statements is correct?

a. sigma subscript x with bar on top end subscript equals fraction numerator sigma over denominator square root of n end fraction, where sigma = (sampled) population standard deviation and n = sample size--assuming n/N less or equal than .05, where N = (sampled) population size.

b. The sampling distribution of x with bar on top is either normally distributed, when the sampled population distribution is normal, or can be approximated by a normal distribution as the sample size becomes large, when the sampled population distribution is not normal.

c. By increasing the sample size, we increase the probability of obtaining a sample mean that is closer to the (sampled) population mean.

d. All of the above.

In: Math

•Explain how to prepare for the ultimate crisis in an organization through succession planning

•Explain how to prepare for the ultimate crisis in an organization through succession planning

In: Operations Management

apply the compatibility and trust assessment and model to an ideal hypothetical healthcare supply chain relationship...

apply the compatibility and trust assessment and model to an ideal hypothetical healthcare supply chain relationship and to a less-than-ideal hypothetical healthcare supply chain management

In: Operations Management