Escolar Documentos
Profissional Documentos
Cultura Documentos
and it holds for all x P R. Your program will support this claim by
plotting the Taylor polynomials p1qk x2k
p2k 1q!
k0
N 1 which approach the sine function as N increases. Write a Matlab
function with the definition
function [c] = sinPoly(n)
where c is the vector of n
Taylor polynomial is n). 1 coefficients of the Taylor polynomial of order
n (i.e. the highest order of the Your function should check that the input
variable n is odd. If it is even, it should print an error message
and return c=0. You may find the mod function useful here. Using your
sinPoly function, plot on the same axes the function sinpxq and the
Taylor polynomials of degree
5, 9, 13, 17, 21 in r2, 2s on a grid of 1000 equally spaced points. You
may use polyval to evaluate the
polynomials on the grid. Use a legend to label the plotted curves and
place it outside of the figure. For eachdegree, print on the screen the
maximum absolute error between the sine function and the Taylor
polynomial
on the same grid. 2
---------------------------------------------------------------------------------------
Founded six years ago, Cloud 9 has since acquired 500 business clients,
who use Cloud 9's infrastructure to store archived data. Among these
clients, a few are large companies with several terabytes (TB) of data
archived at Cloud 9, but on average each client company stores about
400 Gigabytes (GB) of data on Cloud 9's disk drives. Cloud 9's
connection to the Internet is a Gigabit Ethernet line that has an effective
aggregate transmission rate of 1 Gbps (1,000,000,000 bits per second).
4. Each of Cloud 9's client has found adequate transmission and storage
capacity to receive the data to be moved back.
Questions:
a.If all of Cloud 9's clients start moving their data out at the beginning of
the 15-day period by sharing Cloud 9's Internet connection, will there be
enough time to move all the data out? Show your calculations.
b. What alternatives do Cloud 9's clients have, other than moving their
data out over telecommunications lines?
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
CIS 489 Final Project: Project Plan
---------------------------------------------------------------------------------------
CMIS 102Homework 2Test Case Creation
FOR MORE CLASSES VISIT
www.tutorialoutlet.com
Homework 2 Test Case Creation Using the following pseudocode,
provide 3 unique test cases that would help validate your
algorithm. Be sure to place the test cases in a table showing the input
values, and expected output
for each test case.
Write "Enter the price in dollars:"
Input Price
Write "Enter state sales tax(e.g. .06) :"
Input SalesTax
Set Price = Price + (Price * SalesTax)
Write "Price with Tax is" + Price Submit your word or PDF
file to your assignments folder no later than the due date. Grading
guidelines
Submission
A minimum of 3 test cases were provided.
Input provided and explained for each test case.
Expected output provided and explained for each test case.
Test cases represent a wide variety of possible input values (e.g. large
numbers,
small numbers (0), negative, or unexpected non-number entries).
Total Points
2
1
1
1
5
---------------------------------------------------------------------------------------
CMIS 111 Final Project
---------------------------------------------------------------------------------------
CMIT 495 Active Directory Policy Statement General Active Directory Forest
---------------------------------------------------------------------------------------
COM 140Project 3
FOR MORE CLASSES VISIT
www.tutorialoutlet.com
Project 3
1. Specification
The third programming project involves writing a program to calculate
the terms of the following sequence of
numbers: 0 1 1 3 5 11 21 43 where each term is twice the second
previous term plus the previous term. The
0th term of the sequence is 0 and the 1st term of the sequence is 1.
The example below shows how to calculate the next sequence term:
Current sequence: 0 1
Current sequence: 0 1 1
Current sequence: 0 1 1 3
Current sequence: 0 1 1 3 5
etc. Calculate next term: 2 * 0 + 1 = 1
Calculate next term: 2 * 1 + 1 = 3
Calculate next term: 2 * 1 + 3 = 5
Calculate next term: 2 * 3 + 5 = 11 The interface to the program should
be a Swing based GUI that looks similar to the following: The pair of
radio buttons allows the user to choose whether an iterative or recursive
method is used to compute
the term of the sequence. When the user enters a value for n and then
clicks the Compute button, the nth term of
the sequence should be displayed in the Result field. The Efficiency field
should contain the number of calls to the
recursive method when the recursive option is chosen and the number of
iterations of the loop when the iterative
option is selected. The program will check the validity of the user input
value which should be a positive integer. A
message will be shown in a JOptionPane for illegal entered values.
The Iterative radio button should be initially selected.
When the window is closed, the efficiency values should be computed
with values of n from 0 to 19 and written to
a text file outData.txt. Each line of the file should contain the value of n,
the efficiency of the iterative method for
that value of n and the efficiency of the recursive method. The values
should be separated by commas so the file
can be opened with Excel and used to graph the value of the efficiencies
for both the iterative and recursive
options along the y axis with the value of n along the x-axis. The graph
should be included in the solution
description document that accompanies this project and should also
contain a brief explanation of the observed
results.
The program should consist of two classes. 1 1. The first class P3GUI
should define the Swing based GUI and should be hand-coded and not
generated by a GUI
generator. In addition to the main method and a constructor to build the
GUI, an event handler will be needed to
handle the Compute button click and another handler will be needed to
produce the file described above when
the window is closed. The latter handler should be an object of an inner
class that extends the WindowAdapter
class.
2. The other class should be named Sequence. It should be a utility class
meaning that all its methods must be
class (static) methods and no objects should be able to be generated for
that class. It should contain three public
methods:
a. The first method computeIterative should accept a value of n and
return the corresponding element in
the sequence using iteration.
b. The second method computeRecursive should accept a value of n and
return the corresponding element
in the sequence using recursion. This method will initialize the
efficiency counter before calling the private
recursive method that will actually perform the recursive computation.
c. The third method getEfficiency will return the efficiency counter left
behind by the previous call to either
of the above two methods.
Your program should compile without errors.
The Google recommended Java style guide
(https://google.github.io/styleguide/javaguide.html) should be used to
format and document your code. Specifically, the following style guide
attributes should be addressed: Header comments include filename,
author, date and brief purpose of the program. In-line comments used to
describe major functionality of the code. Meaningful variable names and
prompts applied. Class names are written in UpperCamelCase. Variable
names are written in lowerCamelCase. Constant names are in written in
All Capitals. Braces use K&R style. In addition the following
design constraints should be followed: Declare all instance variables
private
Avoid the duplication of code Test cases should be supplied in the form
of a table with columns indicating what aspect is tested, the input
values, expected output, actual output and if the test case passed or
failed. This table should contain 5 columns
with appropriate labels and a row for each test case. Note that the actual
output should be the actual results you
receive when running your program and applying the input for the test
record. Be sure to select enough differentkinds of employees and
situations to completely test the program.
2. Submission Requirements
Submit the following to the Project 3 assignment area no later than the
due date listed in your LEO classroom.
1. Source files P3GUI.java, Sequence.java and the program generated
output file outData.txt. The source code
should use Java code conventions and appropriate code layout (white
space management and indents) and
comments. All submitted files may be included in a .zip file. 2 2. The
solution description document P3SolutionDescription (.pdf or .doc /
.docx) containing the following:
(1) Assumptions, main design decisions, error handling;
(2) Test cases table
(3) The graph of the value of the efficiencies for both the iterative and
recursive options along with a brief
explanation of the observed results.
(4) Screen captures showing successful program compilation and test
cases execution. Each screen capture should
be properly labeled, clearly indicated what the screen capture represents.
(5) Lessons learned from the project;
3. Grading Rubric
The following grading rubric will be used to determine your grade:
Attribute
P3GUI class Meets
40 points Does not meet
0 points a) Defines the GUI. a) Does not define the GUI. b) Contains a
pair of radio buttons
allowing the user to choose whether an
iterative or recursive method is used to
compute the term of the sequence. b) Does not contain a pair of radio
buttons
allowing the user to choose whether an
iterative or recursive method is used to
compute the term of the sequence. c) Allows the user to enter a value for
n
and click the Compute button, to
display the nth term of the sequence in
the Result field. c) Does not allows the user to enter a
value for n and click the Compute button,
to display the nth term of the sequence in
the Result field. d) User input value is checked and
warning message is displayed if the
entered value is not a positive integer. d) User input value is checked and
warning
message is displayed if the entered value
is not a positive integer. e) Allows the Efficiency field to contain
the number of calls to the recursive
method when the recursive option is
chosen and the number of iterations of
the loop when the iterative option is
selected. e) Does not allow the Efficiency field to
contain the number of calls to the
recursive method when the recursive
option is chosen and the number of
iterations of the loop when the iterative
option is selected. f) The Iterative radio button is initially
set to selected. f) The Iterative radio button is not initially
set to selected. g) When the window is closed, the
efficiency values computes with values
of n from 0 to 19 and writes them to a
file.
h) Each line of the output file contains
the value of n, the efficiency of the
iterative method for that value of n and 3 g) When the window is closed,
the
efficiency values does not compute with
values of n from 0 to 19 and the output
file is not generated.
h) Each line of the output file does not
contain the value of n, the efficiency of the efficiency of the recursive
method.
i) The values of the output file are
separated by commas so the file can be
opened with Excel.
j) Provides an event handler to handle
the Compute button click and another
handler will be needed to produce the
file described above when the window
is closed. The latter handler is an object
of an inner class that extends the
WindowAdapter class. Sequence Class Test Cases the iterative method
for that value of n
and the efficiency of the recursive
method.
i) The values of the output file are not
separated by commas so that the file can
be opened by Excel. 30 points j) Does not provides an event handler to
handle the Compute button click and
another handler will be needed to
produce the file described above when
the window is closed. The latter handler is
an object of an inner class that extends
the WindowAdapter class.
0 points a) All methods are class (static)
methods. a) All methods are not class (static)
methods. b) Contains three public methods. b) Does not contain three
public methods. c) Contains computeIterative method
that accepts a value of n and returns
the corresponding element in the
sequence using iteration. c) Does not contain the computeIterative
method that accepts a value of n and
returns the corresponding element in the
sequence using iteration. d) Contains method computeRecursive
that accepts a value of n and returns
the corresponding element in the
sequence using recursion. d) Does not contain the computeRecursive
method that accepts a value of n and
returns the corresponding element in the
sequence using recursion. e) The computeRecurvise method will
initialize the efficiency counter before
calling the private recursive method
that will actually perform the recursive
computation. e) The computeRecurvise method does
not initialize the efficiency counter before
calling the private recursive method that
will actually perform the recursive
computation. f) The getEfficiency method returns the
efficiency counter left behind by the
previous call to either of the above two
methods.
10 points f) The getEfficiency method does not
return the efficiency counter left behind
by the previous call to either of the above
two methods.
0 points a) Test cases are supplied in the form
of table with columns indicating test
case objective, the input values,
expected output, actual output and if
the test case passed or failed. a) No test cases were provided. b) Enough
scenarios selected to 4 completely test the program. Documentation and
Style
guide c) Test cases were included in the
supporting word or PDF
documentation.
20 points
a) Solution description document
P3SolutionDescription includes all the
required sections appropriate titled. 0 points
a) No solution description document is
included.
Source code criteria Source code criteria
b) Header comments include filename,
author, date and brief purpose of the
program.
c) In-line comments used to describe
major functionality of the code.
d) Meaningful variable names and
prompts applied.
e) Class names are written in
UpperCamelCase.
f) Variable names are written in
lowerCamelCase.
g) Constant names are in written in All
Capitals.
h) Braces use K&R style.
i) Declare all instance variables private.
j) Avoids the duplication of code. 5 b) Java style guide was not used to
prepare the Java code.
c) All instance variables not declared
private.
d) Duplication of code was not avoided.
---------------------------------------------------------------------------------------
COP 3330 Upon completion of this program
Hint - start with the program that checks '(...)' and when all the common
errors are correctly reported, expand the parentheses syntax to ([{...}])
---------------------------------------------------------------------------------------
CS 161Assignment 4 Strings and Function
FOR MORE CLASSES VISIT
www.tutorialoutlet.com
Assignment 4
Strings and Functions
Due: Sunday, February 19, 2017 11:59pm
(90 pts) Problem Statement: Wheel of Fortune
You will implement the program for playing a modified Wheel of
Fortune. The game must allow
a user to enter the number of rounds to play and a new secret message
(possibly containing
blanks) with each round, and print the number of dashes/slots for the
message (spaces do not
get dashes, just the space).
If you are not familiar with the game of Wheel of Fortune, then you can
watch an episode on
YouTube: https://www.youtube.com/watch?v=A8bZUXi7zDE
NOTE: I realize there are solutions to assignments online, but resist the
temptation of using
these because the assignments are checked against online resources,
code submitted by
classmates, and code submitted by prior students for
cheating/plagiarism. It is much more
gratifying to complete this on your own. Make sure you take time to
design well!!!
The game can play with 1-3 players, and it continues a round, until
someone solves the puzzle
correctly. A new puzzle is given with each round. In this Wheel of
Fortune, you wont win as
much or any prizes, but you might go bankrupt or lose a turn!!! Your
random numbers are only
from 0-21, with 0 being bankrupt, 1-20 being the dollar amount earned
per letter found in the
puzzle, and 21 is lose a turn.
The game begins by asking the first player if he/she wants to spin the
wheel, buy a vowel, or
solve the puzzle. On a players first turn, it might not make sense to
choose anything other than
spinning the wheel, but a player is given these three choices at all times
during their turn, until
they guess an incorrect non-vowel letter, incorrectly solve the puzzle, or
spin a 0 or 21.
If the player chooses to spin and the spin is >0 and <21, then the
player is asked to guess a
non-vowel letter. If the non-vowel letter was not found in the puzzle,
then the player loses their
turn to the next player. If the non-vowel letter is found in the puzzle,
then the player wins the
number of letters found times (*) the dollar amount spun.
If a player spins a 0, then the players earnings go to a zero in that round,
and the next player
gets the three choices to spin the wheel, solve the puzzle, or buy a
vowel. If a player spins a
21, then the players keeps the round earnings, but the next player gets
the three choices to
spin the wheel, solve the puzzle, or buy a vowel.
If a player chooses to solve the puzzle and does so correctly, then the
player gets to keep all
the money earned in that round, while all other players lose their money
in that round. If a
player chooses to solve the puzzle and does so incorrectly, then the turn
goes to the next
player.
A player can only buy a vowel when his/her earnings are >= $10,
which is the one-time amount
paid for each vowel guess, regardless of whether the vowel is found.
The player who has the most money after N rounds is the winner!
A few rule specifics: You have a total round earnings and a total game
earnings. You always get a choice of spinning the wheel, solving the
puzzle, or buying a vowel
during your turn, buy you cannot buy a vowel if you have less than $10.
You lose your turn by incorrectly guessing a non-vowel letter on a spin,
spinning a 0 or
21, or incorrectly solving the puzzle. If you spin > 0 or <21, then
you get the number spun times (*) the number of non-vowel
letters found added to your round total.
If you spin a 0, then you go bankrupt in the round (lose your round
total), and it ends
your turn.
If you spin a 21, then you keep your round total, but it ends your turn.
You can buy a vowel for $10, and you only pay the $10 vowel purchase
once on a
guess, independent of how many are found.
If you solve the puzzle correctly, then you keep the money earned for
that round and add
it to your total game earnings.
You win the game by having the most game earnings, not round
earnings!!! Your program must print out 1) the number spun on the
wheel,2) the number of letters found for
a guess, 3) the total round earnings, 4) the message with the correctly
guessed slots and blank
slots, 5) if the user guesses the message, then a winner message and the
total game earnings
for all players, and 6) after all rounds are played, a message with the
winning player.
Program Requirements: Only use C++ strings, no need for an array!
Hint: use two strings! Your program must ignore cases in the message.
Each function, including main, may not have more than 15 lines of code
(this doesnt include
curly braces, variable declarations, comments, and blank spaces!). You
are not allowed to use global variables.
Read the C++ string documentation to help with this assignment:
http://www.cplusplus.com/reference/string/string/?kw=string
**You can decide how many incorrect guesses a user gets before they
lose. In addition, you can
use the system(clear); command from the <cstdlib> to clear the
screen, after the user enters
their message. Yes they can scroll above to see the message, but we
arent cheaters!!!
Example Run:
Enter a message: National Park Service
How many players do you have? 2
How many rounds for winning? 1
The message is _ _ _ _ _ _ _ _ ____ _______ Player 1:
Do you want to spin (1), solve the puzzle (2), or buy a vowel (3): 1
Your wheel landed on 20
Guess a letter: n
2 found. Total: $40
The message is N _ _ _ _ n _ _ ____ _______ Do you want to spin (1),
solve the puzzle (2), or buy a vowel (3): 1
Your wheel landed on 10
Guess a letter: l
1 found. Total: $50
The message is N _ _ _ _ n _ l ____ _______ Do you want to spin (1),
solve the puzzle (2), or buy a vowel (3): 3
Guess a vowel: a
3 found. Total: $40
The message is N a _ _ _ n a l _ a _ _ _ _ _ _ _ _ _ Do you want to spin
(1), solve the puzzle (2), or buy a vowel (3): 1
Your wheel landed on 0
Total: $0
The message is N a _ _ _ n a l _a__ _______ Player 2:
Do you want to spin (1), solve the puzzle (2), or buy a vowel (3): 1
Your wheel landed on 5
Guess a letter: r
2 found. Total: $10
The message is N a _ _ _ n a l _ar_ __r____ Do you want to spin (1),
solve the puzzle (2), or buy a vowel (3): 1
Your wheel landed on 10
Guess a letter: t
1 found. Total: $20
The message is N a t _ _ n a l _ar_ __r____ Do you want to spin (1),
solve the puzzle (2), or buy a vowel (3): 2
Guess message: National Park Service
You are correct! Player 2 wins round 1.
Player 1 total: $0
Player 2 total: $20
Player 2 wins game!
(10 pts) Extra Credit Error Handling
Make it so that your program never errors on users input! Handle the
following errors: The user enters a message or letter outside of A-Z and
a-z. The user enters an invalid menu choice. The user enters a vowel for
a non-vowel guess. The user enters a non-vowel for a vowel guess.
(-10 pts) Automatic Deduction: You are not allowed to use global
variables in any assignment
in CS 161. There isnt any practical purpose for them in this course.
Keep this in mind as you
design your program with functions.
(10 pts) Program Style/Comments
In your implementation, make sure that you include a program header in
your program, in
addition to proper indentation/spacing and other comments! Below is an
example header to
include. Make sure you review the style guidelines for this class, and
begin trying to follow
them, i.e. dont align everything on the left or put everything on one
line!
http://classes.engr.oregonstate.edu/eecs/winter2017/cs161-
001/161_style_guideline.pdf
You are graded on having a header, function headers with pre/post
conditions, proper
comments, and readable code with indentation and vertical spacing that
is CONSISTENT
throughout your program. DO NOT align your entire program on the left
side. This will cause
you to automatically lose the full 10 points. In addition, do not forget
your program header!!!
Electronically submit your C++ program (.cpp file, not your
executable!!!) by the assignment due
date, using TEACH.
---------------------------------------------------------------------------------------
CS 192 Lets think about the use of Lists in everyday life
---------------------------------------------------------------------------------------
CS 210 Introduction to Programming Java Programming Assignment
Part A: Deliverable
For this phase, you are required to create an ER Diagram that will
facilitate the development of CMSs company-wide database. It must be
created using ER Assistant and include entities and attributes,
relationships, and accompanying notes. You must take a screenshot of
your ERD while it is displayed in ER Assistant and paste the screenshot
into a Word document. Make sure that the ERD fits on a single sheet and
is legible. Accompanying notes must be included on a separate sheet of
the document. Name this Word document CMS Project Part A your
last name followed by your first initial.
Example: CMS Project Part A SmithJ.doc
The scope of the database includes all entities referenced above. The
first goal of this phase of development is to support a timekeeping
system that will replace the spreadsheet process illustrated above. Note
that you will not actually create the timekeeping system. You are
responsible only for designing the database that will be used by the
system.
Part B: Background
After much deliberation, CMS has decided to broaden its operations by
expanding into various parts of Europe and also Canada. It plans to
recruit employees from Canada, Italy, France, and Ireland. Each of these
countries offers different benefit packages. Presently, under the manual
spreadsheet system, human resource personnel have to maintain only
two types of benefit allotments. In the newly expanded company, this
manual process will be unmanageable.
The following table lists the different benefit packages in each country.
Some characteristics are unique to each country while others are unique
to a region.
Region Country Holidays WeeklyHours VacationDaysAllowed
North America US 11 40 10
North America Canada 12 40 15
Europe UK 10 38 10
Europe France 14 38 10
Europe Ireland 10 38 15
Europe Italy 9 38 20
In the same manner that employees must track the time they spend
working on projects, they must also log the days they use as holidays
and vacation. Below is a sample timesheet for recording benefit time
taken. Note that this benefit section exists on the same timesheet that is
used to log hours to projects, but benefits are not related to projects.
---------------------------------------------------------------------------------------
Difference between two sets. Given two arrays ????
and ????
FOR MORE CLASSES VISIT
www.tutorialoutlet.com
Difference between two sets. Given two arrays ????[] and ????[], each
containing distinct values, design a subquadratic algorithm to count the
number of values that are contained either in array ????[] and array ????
[] but not both. Create test program DiffSets.java that takes
three command line arguments <size_of_a><size_of_b><number of
iterations>
1. Create arrays a and b of the mentioned size and fill it with uniformly
random numbers between (0-max(size_a, size_b)) <- in this case this
would be 0-20
2. Find the numbers that are only present in a or b but not both.
---------------------------------------------------------------------------------------
Are you comfortable (or would you use) a wireless hot spot to do
computer work?
---------------------------------------------------------------------------------------
IST 220 Java classes to model a small plane flying passengers from State College,
PA to Orlando, FL
---------------------------------------------------------------------------------------
IT 407 assignment 1
---------------------------------------------------------------------------------------
IT 409 Assignment 1
---------------------------------------------------------------------------------------
John <..n@abxz.com 5
Mary <..h@abxz.com 3
Philip <..x@abxz.com 5
While there are many varieties of databases, the relational database
model is the model utilised in common systems such as Oracle, MySQL,
MS SQL Server and MS Access. As such, it is imperative to understand,
recognise, and interpret relations within these databases. That said,
consider the following relational database instructions:
Employees
Manager_Name Floor_#
Karen 4
David 5
Department
a. RESULT = PROJECT Location from Employees
b. RESULT = SELECT from Employees where Location = 5
c. RESULT = PROJECT Floor_# from Department
d. RESULT = JOIN Employees and Department where
Employees.Location = Department.Floor_#
In this Hand-In Assignment, you will decipher the presented database
instructions, and determine relation RESULT.
To prepare for this Assignment:
---------------------------------------------------------------------------------------
..7
1.1 Brief Company
Background
.7
1.2 Discussion of the Business
Problems...8
1.3 High-Level
Solution
..........9
1.4 Benefits of Solving the
Problem......10
1.5 Business or Technical
Approach.10
1.6 Business Process
Changes
11
1.7 Technology or Business Practices used to augment the
solution...11
1.8 Conclusions and overall
Recommendations12
1.9 High-level Implementation Plan
..12
2.0 Summary of
Project
..13 References
Do not prompt the user for any input, except for the
InputMismatchException, other than menu item number. Use hard coded
literal values for data required for variables and member variables, class
constructor calls, and other program variables.
Your program(s) must include a description of what user is being
prompted for each input.
---------------------------------------------------------------------------------------