Write a method with the following header:
public static void showGradeDistribution(int a, int b, int c, int d,
int f)
It should print a graph (using asterisks) for each of the letters entered in the reverse order of the
parameter list and with a label. In addition, if A and B grades sum is equal or exceeds that of grades C
and D and F, the message “Strong class!” should be displayed. For example a method call of:
showGradeDistribution(5,7,4,4,3);
Would print:
A: *****
B: *******
C: ****
D: ****
F: ***
Strong class
In: Computer Science
Use a table to identify the software products sited in the BayState Realty Case Study that fall within the following categories of software. You need not limit yourself to only those products mentioned. Think outside the box as to other software that BayState might need.
system software
general purpose software
application specific software
System Software |
General Purpose Software |
Application Specific |
add more rows as needed |
Use a second table to identify and explain the various elements in the total cost of software ownership and then list the steps taken by the CIO to limit the firm’s software TCO expenditures.
Elements of TCO |
Explanation |
Steps taken by the CIO for cost control:
.
.
.
add more lines as needed
List the reasons why BayState Realty chose to go with off-the-shelf software instead of developing their own software packages in house.
.
.
.
add more lines as needed
List the reasons why it makes sense to go with Linux in the data center. Be sure to include how this particular use of open source software mitigates the risks typically associated with the choice of an open source software product.
.
.
.
add more lines as needed
Compare the advantages and the disadvantages associated with outsourcing the hosting of the firm’s three Web sites.
Advantages |
Disadvantages |
add more rows as needed |
BayState Realty is one of the largest and most successful real estate agencies in the Commonwealth of Massachusetts with over 370 agents, a headquarters in the Back Bay of Boston and 12 regional offices across New England. The offices in Boston accommodate 280 employees, including both agents and all of the firm’s administrative and operational functions, like Accounting and Information Technology, on three floors of a financial district high-rise. Each HQ employee has a wired workstation running on a local area network (LAN). The LAN allows office access to common services and to share high-end printers, computer projection systems, and local data-back-up servers. Employees also use a variety of wide-area networks (WANs) to access corporate information systems as well as a rich body of documents, photographs, and property videos stored on BayState’s servers that are hosted at the off sight, BayState Realty Data Center.
As part of day-to-day operations, the firm employs a customer relationship management (CRM) system to maintain information on its high-end corporate and residential clients as well as potential clients. The firm also maintains large, multi-media files of photographs, floor plans, and video tours for all of the properties it represents for its clients. In addition, the firm operates an Internet site to market its services to the public, an Extranet site for the management of its commercial real estate business in collaboration with corporate partners and affiliations across the globe, and an Intranet site as a knowledge repository for sharing real estate selling and management best practices, and as a gateway to many other firm-wide information resources. The culture at BayState is fast-paced but highly collaborative which means that timely access to property information and related artifacts is essential for success.
Sally Smith is the chief information officer (CIO) for BayState. In this role, Sally must ensure that firm employees have access to all of the software required to enable BayState’s core business processes – i.e. working with customers around the buying and selling, or the leasing and renting of either commercial or residential real estate. Though this software is essential to transacting, managing, and innovating within the firm, it is also viewed as an overhead cost. Therefore, part of Sally’s job is to manage the total cost of the firm’s software ownership (TCO). To this end, Sally focuses on the procurement and deployment of a limited set of well-established, off-the-shelf products in line with the needs of the organization. She also works to leverage open source software products when it makes sense to do so.
For example, in terms of system software, BayState employees use only Dell laptop and desktop computers running Microsoft’s Windows operating system. BayState (Dell) servers also run Microsoft operating systems. However, she was obliged to add Android smart phones and tablets to this list at the insistence of the sales staff. Cisco (network management) and Symantec (information security) software products are uniformly deployed to manage BayState networks and to protect the firm’s hardware platforms from unauthorized intrusion, malware, and computer viruses. For general purpose software, Sally has again settled on Microsoft Office as the firm’s suite of personal productivity tools, Internet Explorer for Web browsing, Microsoft Outlook for e-mail, and Microsoft SharePoint for Intranet and Extranet collaboration. These choices allow Sally to negotiate favorable licensing terms with Microsoft for the initial acquisition of products, to standardize and minimize implementation costs, and to limit firm investments in ongoing staff training and product documentation and support. At the same time, her technical staff is experimenting with Linux as an open source alternative to Microsoft SQL Server within the Data Center.
For the specific business functions of the firm, Sally’s information technology team has worked closely with their line-of-business colleagues to select best-in-breed application specific software. These software products include the CRM system mentioned previously as well as an Accounting System, a Human Resource Management System, a Real Estate Sales Documentation and Management System, a Rental Property Management System, and many others process-enabling application systems. In making these choices, the firm has focused first and foremost on the “fit” of each application specific product to ensure that it complements the firm’s ongoing business process. Here choices are made to ensure both proper alignment between the business and tis enabling software and effective cost control. Sally and her colleagues have resisted the temptation to customize these software products to better fit with the business. Instead, they have adapted the firm’s business processes to make the best use of the software in question and in so doing better control the TCO for that software.
More recently, the BayState IT team has taken a number of steps to expand the software standards for the firm. As employees have asked for smart phone and tablet computers, Sally’s team has worked to identify products that fit best within the overall embedded base of BayState’s existing hardware and software acquisitions, thus minimizing integration costs for these new products. The IT staff members operating the firm’s data center have begun the implementation of Linux (an open source software product) as the operating system of choice for servers running shared applications, like Accounting, HR and CRM. Finally, Sally found that it made more sense for the firm to outsource the hosting of its Web sites to a third party because the hosting firm was better equipped for 24 X 7 support of firm Web sites. The hosting company also enjoyed greater economies of scale in operating and maintaining BayState Realty’s Web site platforms.
In: Computer Science
7. Substantiate or refute the following: As the cipher text sample size becomes smaller, cryptanalysis becomes easier.
In: Computer Science
Matlab: How would I write a script that calculates a. 654.23+345.73 b. 3984566/5.5 (need to use the format long command)
In: Computer Science
Exercise 3
Step 1:
When you read Storing Data Using Sets, you learned that Python's set type allows us to create mutable collections of unordered distinct items. The items stored in a set must be immutable, so sets can contain values of type int, float or str, but we can't store lists or sets in sets. Tuples are immutable, so we can store tuples in sets. Try this experiment, which creates a set containing the points (1.0, 2.0), (4.0, 6.0) and (10.0, -2.0). What is displayed when points is evaluated? Write the question and the answer in lab11.py using python comments. >>> points = {(1.0, 2.0), (4.0, 6.0), (10.0, -2.0)} >>> points We can also initialize the set this way. Try this experiment. What is displayed when points is evaluated? Write the question and the answer in lab11.py using python comments. >>> point1 = (1.0, 2.0) >>> point2 = (4.0, 6.0) >>> point3 = (10.0, -2.0) >>> points = {point1, point2, point3} >>> points We could instead start with an empty set, and call the add method to initialize it, one point at a time. Try this experiment. What is displayed when points is evaluated? Write the question and the answer in lab11.py using python comments. >>> points = set() >>> points.add(point1) >>> points.add(point2) >>> points.add(point3) >>> points
Step 2:
What happens if we try to insert a point that is already in the set? Try this experiment: >>> points.add(point2) >>> points How many copies of point (4.0, 6.0) are in the set? Write the question and the answer in lab11.py using python comments.
Step 3:
Can individual points in the set be retrieved by specifying an index (position)? Try this experiment. What is displayed when points[0] is evaluated? Write the question and the answer in lab11.py using python comments. >>> points[0]
Step 4:
We can use a for loop to iterate over all the points in the set. What is displayed when this loop is executed? Write the question and the answer in lab11.py using python comments. >>> for point in points: ... print(point) ...
In: Computer Science
Describe how the governments of Saudi Arabia, the People’s Republic of China, and the United States regulate the Web.
In: Computer Science
1. Consider the following scenario:
The Colonel Motors Corporation of Frankfort, Kentucky has produced a new line of vehicles which require chicken droppings for fuel. Because of this unusual fuel requirement, there are only certain fueling stations in the country where the vehicles can be refilled. Thus, to get from one place to another, an owner must plan a route that ensures that he can get refills along the way. The Colonel Motors Corporation has hired Professor Sanders of the Kentucky Institute of Technology as a consultant to prepare an online route-finding service. To use the computerized service, an owner will enter the driving range of his vehicle (the distance the vehicle can go on a single fill-up), the "distance to empty" (the distance the vehicle can go with the fuel that's now in the tank), his/her initial location (source), and his/her desired destination. The service will either respond with a shortest route from the source to the destination such that the owner never runs out of fuel, or it will deem that no such route exists. Model the professor's problem in terms of a weighted, directed graph in which streets are edges, intersections are vertices, and some intersections have fueling stations, and design an efficient algorithm to solve it. Assume that a driver's source and destination are also at intersections.
2. Choose an appropriate problem solving technique:
a. Select your favorite programming language such as C, C++, or Java. In that language, write, implement, and test an algorithm using the problem solving technique that you chose.
b. Analyze your implementation using either order notation analysis or empirical analysis.
c. You must prepare a separate page providing the instructions to compile and execute your program, such as the development environment (e.g., Visual Studio). If no such information is provided, and your program fails to build and run, points will be deducted, as appropriate.
TASK:
1. Java code
2. Discussion of your problem solving technique and why chosen
3. Algorithm (pseudocode, source, etc.)
4. Correctness
In: Computer Science
In: Computer Science
Please enter your response to both questions posed below.
Subject : Computer And Network Security
Total word count must be 250 to 300 words in your posting. (20 points)
Please also respond to at least two of your classmates with a meaningful reply of 150 words or greater each. (5 points each)
Please provide references for your original postings in APA format.
In: Computer Science
8. write a program using switch-case statements that ask a user to enter a temperature value in degrees Fahrenheit (In your program, use an integer to record the user’s entry. If the temperature falls between 0 and 96 make it print “Temperature below normal”. If the temperature is 97, 98, make it “Temperature normal”. If the temperature is between 100 and 150, print “You have a fever”. If the temperature is outside the ranges given above, display “Are you human”.
Please write in C++
In: Computer Science
trying to make a code that simulates a predator prey relationship in python, however for some reason my code will not show the plot, i cant find any issues with syntax or anything else, please help.
import matplotlib.pyplot as plt
predatorcount = []
preycount = []
def simulate(initialpred, initialprey, preygrowth, predationrate, predshrink, predbirthrate):
predatorcount.append(initialpred)
preycount.appened(initialprey)
i=0;
prey = 1
predator = 1
while True:
prey =
preycount[i]*(1+(preygrowth-predationrate*predatorcount[i]))
predator =
predatorcount[i]*(1-(predshrink+predbirthrate*preycount[i]))
if prey <= 0 or predator <=0:
break;
else:
preycount.append(prey)
predatorcount.append(predator)
i = i+1
simulate(50, 1000, 0.25, 0.01, 0.05, 0.00002)
print(preycount[35])
plt.plot(range(35), predatorcount[35])
plt.plot(range(35), preycount[35])
plt.show()
In: Computer Science
Python HW with Jupyter Notebook
Dictionary Data
DATA = { 2: 7493945, 76: 4654320, 3: 4091979, 90: 1824881, 82: 714422, 45: 1137701, 10: 374362, 0: 326226, -15: 417203, -56: 333525, 67: 323451, 99: 321696, 21: 336753, -100: 361237, 55: 1209714, 5150: 1771800, 42: 4714011, 888: 14817667, 3500: 13760234, 712: 10903322, 7: 10443792, 842: 11716264, 18584: 10559923, 666: 9275602, 70: 11901200, 153: 12074784, 8: 4337229 }
Expected Output
>>> iter_dict_funky_sum(DATA) 140166242
In: Computer Science
[Q.4] Answer the following questions
You are invited as a database architect to develop database schema for maintaining patient information for the NYU medical group (make necessary assumptions for the data requirements if needed).
Each physician in the Lehman medical group is uniquely identified by physicianID o Each physician must have first name, and last name, and phone number
Each patient is identified by patientID
o Each patient must have first name, and last name, phone number,
and insurance card number (if the patient has)
Each patient gets a treatment from a physician.
o Each treatment is identified by a unique treatementCode
o Each treatment is described by a simple description
Patients, Physicians, and Treatments are associated by a patientTreatement relationship type. The relationship type has two attributes to record date and time of the patient visit and patient co-payment (or minimum payment if the patient does not have medical insurance)
(a) Design a conceptual schema using ER diagram for storing and managing the data as explained above.
(b) Derive the logical database schema from the conceptual schema you designed.
In: Computer Science
The Problem
Below are a series of problems you need to solve using recursive functions. You will write a program that will read commands from an input file, with each command referring to one of the recursive problems to be executed. Each command will be followed (on the same line of input) by the respective parameters required for that problem.
Implementation
Each recursive function MUST have a wrapper function enclosing it where you will do input/output file processing as well as calling the actual recursive function. From Wikipedia, “A wrapper function is a function in a computer program whose main purpose is to call a second function”. As an example, here is one of the wrapper functions you will use:
void KnightsFlip(FILE *fin, FILE *fout);
This would be the wrapper function for one of the recursive problems, called KnightsFlip (described, in detail, below). These wrapper functions will simply do three things:
Of course, at your own discretion (meaning, your own choice), you can make auxiliary functions for your recursive functions to use, such as functions to swap values in an array, take the sum of an array of values, printing functions, etc.
Five Problems to Solve Using Recursion:
(1) KnightsMultiply
Write a recursive function that multiplies all values from k up to n and returns the result (as a double). For example: if k = 5, and n = 10, then multiply 5 * 6 * 7 * 8 * 9 * 10 to return 151200.
(2) KnightsFlip
You have an index card with the letter K written on one side, and F on the other. You want to see ALL of the possible ways the card will land if you drop it n times. Write a recursive function that prints each session of dropping the cards with K's and F's. For example of you drop it 4 times in a given session, all possible ways to drop it are as follows:
KKKK
KKKF
KKFK
KKFF
KFKK
KFKF
KFFK
KFFF
FKKK
FKKF
FKFK
FKFF
FFKK
FFKF
FFFK
FFFF
*Note: The possible ways would have to print in this specific order.
(3) KnightsShape
Simply write a recursive function that prints a large X composed of smaller X's with a given “width”, n, which is guaranteed to be odd. Example for an X of width n = 7:
X X
X X X X
X
X X
X X
X X
*Note: to be clear, the “width” is the length (number) of X’s along one line of the large X.
(4) KnightsScotch
No, this has nothing to do with drinking Scotch! Suppose you are playing a special game of hopscotch on a line of integer numbers drawn on the ground like so:
4 4 1 5 2 6 3 4 2 0
The number, with a square around it, indicates where you are currently standing. You can move left or right down the line by jumping the number of spaces indicated by the number you are standing on. So if you are standing on a 4, you can jump either left 4 spaces or right 4 spaces. You cannot jump past either end of the line.
For example, the first number (4) only allows you to jump right, since there are no numbers to the left that you can jump to.
The goal: you want to get to the 0 at the far end (right side) of the line. You are also guaranteed that there will be only one zero, which, again, will be at the far right side.
Here is how you do that with the above line:
Starting 4 4 1 5 2 6 3 4 2 0 position
Step 1: 4 4 1 5 2 6 3 4 2 0
Jump right
Step 2: 4 4 1 5 2 6 3 4 2 0
Jump left
Step 3: 4 4 1 5 2 6 3 4 2 0
Jump right
Step 4: 4 4 1 5 2 6 3 4 2 0
Jump right
Step 5: 4 4 1 5 2 6 3 4 2 0
Jump left
Step 6: 4 4 1 5 2 6 3 4 2 0
Jump right
Some KnightsScotch lines have multiple paths to 0 from the given starting point. Other lines have no paths to 0, such as the following:
3 1 2 3 0
In this line, you can jump between the 3's, but not anywhere else.
You are to write a recursive function that returns an integer 1 (for solvable) or 0 (for not solvable), indicating if you are able to get to the rightmost 0 or not.
(5) KnightsDepot
You are working on an engineering project with other students and are in need of 2x4s (2 by 4’s) of various lengths. Thankfully, UCF has its very own “Depot” store: KnightsDepot…so you don’t have to drive far. Unfortunately, KnightsDepot only carries 2x4s in fixed lengths. So your team will have to purchase the 2x4s and then cut them as needed. Because of your tight college student budget, you want to buy the least number of 2x4s in order to cover the lengths requested by your team.
The recursive function you are designing will return the minimum number of 2x4s you need to purchase, in order to cover the lengths requested by your team. Example:
Array of 2x4 lengths requested by your team: { 6, 4, 3, 4, 1, 3 }
Fixed length of 2x4s at KnightsDepot: 6 (so each purchased 2x4 has a length of 6)
A possible arrangement of of 2x4s: { 6 } { 3, 3 } { 4, 1 } { 4 }
Minimum number of 2x4s needed to purchase: 4
Wrapper Functions
As mentioned, you MUST use the following five wrapper functions EXACTLY as shown:
void KnightsMultiply(FILE *fin, FILE *fout); void KnightsFlip(FILE *fin, FILE *fout); void KnightsShape(FILE *fin, FILE *fout); void KnightsScotch(FILE *fin, FILE *fout); void KnightsDepot(FILE *fin, FILE *fout);
Input File Specifications
You will read in input from a file, "KnightsRecurse.in". Have this AUTOMATED. Do not ask the user to enter “KnightsRecurse.in”. You should read in this automatically (this will expedite the grading process). The file will contain an arbitrary number of lines and on each line there will be a command. Each command will be followed by relevant data as described below (and this relevant data will be on the same line as the command).
We will not tell you the number of commands in the file. So how do you know when you’ve read all the commands in the input file? You can use the <stdlib.h> function feof(FILE * file) to determine if you have reached the end of the file.
The commands (for the five recursive functions), and their relevant data, are described below:
KnightsMultiply - This command will be followed by the following information: k and then n, as described above.
KnightsFlip - This command will be followed by a single integer, n, as described above.
KnightsShape - This command will be followed by a single integer, n, as described above.
KnightsScotch - This command will be followed by an integer, start, representing the initial position on the line you are playing on (0 means the far left, the first position); size, the number of integers drawn on the ground; size will be followed by size number of integers, the integers drawn on the ground. (see input file for examples)
KnightsDepot - This command will be followed by an integer maxlen, which represents the maximum 2x4 length the store sells; size, the number of 2x4s your team needs; size will be followed by size number of integers, the length of each 2x4 your team needs. It is guaranteed that the requested lengths will all be less than or equal to the maxlen sold by the store.
In: Computer Science