SlideShare a Scribd company logo
1 of 12
Important notes
· NOTE: it is usually fine and often encouraged if you would
like to write one or more helper functions to help you write a
homework problem's required functions.
· HOWEVER -- whenever you do so, EACH function you define
SHOULD follow all of the design recipe steps: first write its
signature, then its purpose statement, then its function header,
then its tests/check- expressions, then replace its ... body with
an appropriate expression)
· Remember: Signatures and purpose statements are ONLY
required for function definitions -- you do NOT write them for
named constants or for non-function-definition compound
expressions.
· Remember: A signature in Racket is written in a comment, and
it includes the name of the function, the types of expressions it
expects, and the type of expression it returns. This should be
written as discussed in class (and you can find examples in the
posted in-class examples). For example,
; signature: purple-star: number -> image
· Remember: a purpose statement in Racket is written in a
comment, and it describes what the function expects
and describes what the function returns (and if the function has
side-effects, it also describes those side-effects). For example,
; purpose: expects a size in pixels, the distance between
; points of a 5-pointed-star, and returns an image
; of a solid purple star of that size
· Remember: it is a COURSE STYLE STANDARD that named
constants are to be descriptive and written in all-uppercase --
for example,
(define WIDTH 300)
· You should use blank lines to separate your answers for the
different parts of the homework problems. If you would like to
add comments noting which part each answer is for, that is fine,
too!
· Because the design recipe is so important, you will
receive significant credit for the signature, purpose, header, and
examples/check-expects portions of your functions. Typically
you'll get at least half-credit for a correct signature, purpose,
header, and examples/check-expects, even if your function body
is not correct (and, you'll typically lose at least half-credit if
you omit these or do them poorly, even if your function body is
correct).
Problem 1
Start up DrRacket, (if necessary) setting the language to How
To Design Programs - Beginning Student level, and adding the
HTDP/2e versions of the image and universe teachpacks by
putting these lines at the beginning of your Definitions window:
(require 2htdp/image)
(require 2htdp/universe)
Put a blank line, and then type in:
· a comment-line containing your name,
· followed by a comment-line containing CS 111 - HW 3,
· followed by a comment-line giving the date you last modified
this homework,
· followed by a comment-line with no other text in it --- for
example:
; type in YOUR name
; CS 111 - HW 3
; last modified: 2016-02-08
;
Below this, after a blank line, now type the comment lines:
;
; Problem 1
;
Note: you are NOT writing a function in this problem -- you are
just writing two compound expressions.
Sometimes, when a function returns a number with a fractional
part, especially a number such as the result of (/ 1 3), it
becomes difficult to give an expected value in a check-
expect that is "exact enough" for a passing test. Yet, if the
expected value is "close enough" to the actual value, we might
like to be able to decide that that is good enough for our
purposes.
That is why, along with several additional check- functions,
BSL Racket also includes check-within, which expects three
arguments:
· the expression being tested, which in check-within's case
should be of type number
· an approximate expected value for that expression
· a number that is the largest that the difference between the
expression and the expected value can be and still consider this
to be a passing test. (In math, this maximum difference is also
called a delta.)
As a quick example, what if you simply wanted to test whether
BSL Racket's predefined pi was within .001 of 3.14159?
This check-within expression can do this, and show that it is:
; passing test
(check-within pi
3.14159
.001)
But if you want to know if its predefined pi is within .000001
of 3.14159, this check-within expression can do this, and show
that it is not:
; failing test
(check-within pi
3.14159
.000001)
Just to practice writing a few expressions using check-within:
· write a check-within expression that will result in a passing
test for testing what the expression
(/ 1 3)
...should be roughly equal to;
· write a check-within expression that will result in a passing
test for testing what the expression
(* pi 10 10)
...should be roughly equal to.
Problem 2
Next, in your definitions window, after a blank line, type the
comment lines:
;
; Problem 2
;
Write a function that expects a temperature given in Celsius,
and returns the equivalent Fahrenheit temperature. Write such a
function cels->fahr, using the following design recipe steps:
(It is reasonable to search the web or an appropriate reference
for the conversion formula for this -- consider it problem
research.)
2 part a
Write an appropriate signature comment for this function.
2 part b
Write an appropriate purpose statement comment for this
function.
2 part c
Write an appropriate function header for this function
(putting ... ) for its body for now).
2 part d
Write at least 2 specific tests/check-expect or check-
within expressions for this function.
2 part e
Only NOW should you replace the ... in the function's body with
an appropriate expression to complete this function. Run and
test your function until you are satisfied that it passes its tests
and works correctly.
Finally, include at least 2 example calls of your function (such
that you will see their results) after your function definition.
Problem 3
Next, in your definitions window, after a blank line, type the
comment lines:
;
; Problem 3
;
Write a function name-badge that expects a name, and returns
an image of a "name badge" for that name: a shape (of your
choice of shape and color) with the given name in its middle.
Somehow make the width of your "badge" be based on the
name's length.
(hint: remember that string-length expects a string and returns
how many characters is in that string.)
3 part a
Write an appropriate signature comment for this function.
3 part b
Write an appropriate purpose statement comment for this
function.
3 part c
Write an appropriate function header for this function
(putting ... ) for its body for now).
3 part d
Write at least 2 specific tests/check-expect or check-
within expressions for this function.
3 part e
Only NOW should you replace the ... in the function's body with
an appropriate expression to complete this function.
Run and test your function until you are satisfied that it passes
its tests and works correctly.
Finally, include at least 2 example calls of your function (such
that you will see their results) after your function definition.
Problem 4
We've mentioned the make-color function, which expects three
arguments, each an integer number in [0, 255], representing its
red, green, and blue values, respectively, and returns a color
made up of those red, green, and blue values. Optionally, it can
take a 4th argument, another integer in [0, 255], giving the
transparency of that color (0 is completely transparent, 255 has
no transparency).
But - to play with this is a little inconvenient, because to "see"
what the returned color looks like, you have to use the resulting
color in some image function.
Design a function color-swatch that expects desired red, green,
and blue values, and returns a solid rectangle image whose color
has those red, green, and blue values. (You can pick a
reasonable constant size for this rectangle.)
OPTIONAL: if you'd like, you can also design this to expect a
transparency value, also.
4 part a
Write an appropriate signature comment for this function.
4 part b
Write an appropriate purpose statement comment for this
function.
4 part c
Write an appropriate function header for this function
(putting ... ) for its body for now).
4 part d
Write at least 2 specific tests/check-expect or check-
within expressions for this function.
4 part e
Only NOW should you replace the ... in the function's body with
an appropriate expression to complete this function.
Run and test your function until you are satisfied that it passes
its tests and works correctly.
Finally, include at least 2 example calls of your function (such
that you will see their results) after your function definition.
Problem 5
Next, in your definitions window, type the comment lines:
;
; Problem 5
;
5 part a
Remember that place-image expects a scene expression for its
4th argument. It can be convenient to use a named constant for
this scene, especially if you will be using it in a number
of place-image expressions and if it might itself include several
unchanging elements.
You are going to be creating some scenes in later parts of this
problem, so for this part, define the following named constants:
· define a named constant WIDTH, a scene width of your choice
(except it should not be bigger than 1300 pixels).
· define a named constant HEIGHT, a scene height of your
choice (except it should not be bigger than 400 pixels).
· define a named constant BACKDROP, an unchanging,
constant scene that will serve as a backdrop scene in some
future problems.
· its size should be WIDTH by HEIGHT pixels
· it should include at least one visible unchanging image of your
choice (and you may certainly include additional visible
unchanging images if you wish).
· (you may certainly include additional named constants, also, if
you wish!)
5 part b
Consider a "world" of type number -- starting from a given
initial number, in which that number changes as a ticker ticks,
and in which the number determines what is shown where (or
how) in a scene.
For this world, big-bang's to-draw clause will need a scene-
drawing function that expects a number, and produces a scene
based on that number. Don't get too far ahead of yourself, here!
Just decide what image(s) is/are going to be ADDED to
your BACKDROP scene from 5 part a based on a number value.
Do something that is at least slightly different than the posted
class examples.
(For example, an image could be placed in
the BACKDROP whose size depends on that number -- and/or
an image's x-coordinate within the BACKDROP could be
determined by that number -- and/or an image's y-coordinate
within the BACKDROP could be determined by that number --
and/or an image's color could be determined by that number --
and/or some combination, letting it determine both the x- and y-
coordinate, for example.)
Write an appropriate signature comment for this function.
5 part c
Write an appropriate purpose statement comment for this
function.
5 part d
Write an appropriate function header for this function
(putting ... ) for its body for now).
5 part e
Write at least two specific examples/tests/check-
expect expressions for this function, placed either before or
after your not-yet-completed function definition, whichever you
prefer.
5 part f
Finally, replace the ... in this function's body with an
appropriate expression to complete it. For full credit, make sure
that you use your BACKDROP scene from 5 part aappropriately
within this expression.
Run and test your function until you are satisfied that it passes
its tests and works correctly.
Also include at least 2 example calls of your function (such that
you will see their results) after your function definition.
5 part g
What change do you want to happen to your world number as
the world ticker ticks? Will it increase by 1? decrease by 1?
Increase and/or decrease by varying amounts?
Decide how your world number will change on each ticker tick.
If your change can be done by a built-in function such
as add1 or sub1, that is fine. Otherwise, using the design recipe,
develop this function, that expects a number and produces a
number.
· (if you develop your own function here, REMEMBER to do all
the steps you have been doing for the other functions in this
homework -- first write its signature, then its purpose statement,
then its function header, then its tests/check-expect expressions,
then replace its ... body with an appropriate expression)
Then write a big-bang expression consisting of an initial
number, and a to-draw clause with the name of your scene-
drawing function from 5 parts b-f, and an on-tickclause with the
name of your (new or existing) number-changing function --
something like:
(big-bang initial-number-you-choose
(to-draw name-of-your-scene-drawing-function)
(on-tick name-of-your-number-changing-function))
(By the way, you can also change the speed of the ticker in
this on-tick clause if you would like to -- give it an optional 2nd
expression, a number that is aticker-rate-expression, and the
ticker will tick every ticker-rate-expression seconds.)
Now you should see something changing in your scene, and now
you are done with this problem.
Business Ethics Rubric
I will be looking for the following items in your Case Study
Analysis.
I. Developing a Practical Ethical Viewpoint (Have you clearly
picked and stated an Ethical Viewpoint) (You need to choose
one for each case study)
A. Utilitarianism
B. Universal Ethics
C. Ethical Relativism
D. Virtue Ethics
II. To help you choose the ethical theory do the following (By
looking at the moral situations):
A. Interpret what is right and wrong according to each of the
four theories
B. Give an argument that each theory might provide
C. State your own assessment of the strengths of each theory
D. State the weakness of each theory
III. Step 1: Analyze the Consequences.
Who will be helped by what you do? Who will be harmed?
What kind of benefits and harm are we talking about? Who will
be helped by what you do? Who will be harmed?
Step 2: Analyze the actions
Consider all the options from a different perspective, without
thinking about the consequences. How do the actions measure
up against moral principles like honesty, fairness, equality,
respecting the dignity of others, and people’s rights? (Consider
the common good.) Are any of the actions at odds with those
standards? If there’s a conflict between principles or between
the rights of different people involved, is there a way to see one
principle as more important than the others? Which option
offers actions that are least problematic?
Step 3: Make a decision
Make a decision. Take both parts of your analysis into account,
and make a decision. This strategy at least gives you some basic
steps you can follow.
1. What are the facts? Know the facts as best you can. If your
facts are wrong, you’re liable to make a bad choice.
2. 2. What can you guess about the facts you don’t know? Since
it is impossible to know all the facts, make reasonable
assumptions about the missing pieces of information.
3. 3. What do the facts mean? Facts by themselves have no
meaning. You need to interpret the information in light of the
values that are important to you.
4. 4. What does the problem look like through the eyes of the
people involved? The ability to walk in another’s shoes is
essential. Understanding the problem through a variety of
perspectives increases the possibility that you will choose
wisely.
5. 5. What will happen if you choose one thing rather than
another? All actions have consequences. Make a reasonable
guess as to what will happen if you follow a particular course of
action. Decide whether you think more good or harm will come
of your action.
6. 6. What do your feelings tell you? Feelings are facts too.
Your feelings about ethical issues may give you a clue as to
parts of your decision that your rational mind may overlook.
7. 7. What will you think of yourself if you decide one thing or
another? Some call this your conscience. It is a form of self-
appraisal. It helps you decide whether you are the kind of
person you would like to be. It helps you live with yourself.
8. 8. Can you explain and justify your decision to others? Your
behavior shouldn’t be based on a whim. Neither should it be
self-centered. Ethics involves you in the life of the world
around you. For this reason you must be able to justify your
moral decisions in ways that seem reasonable to reasonable
people. Ethical reasons can’t be private reasons.
Please do at least the required pages. Please do double spaced.
Please give headings for idea. For example,
Introduction—Explain the case study the facts.
Body of Paper—This is where you state the different ethical
theories, strengths and weaknesses, which theory you choose,
why you choose that theory, what would you do, do you agree
with what was done.
Conclusion—Summary of what you told me in the paper.
In short, please choose a case study from the book. Read the
case study. Analyze the case study under the four theories.
Talk about the strengths and weaknesses of each theory. Choose
the theory that best matches with your worldview. Why did you
pick this theory. Under Step 3 these questions will help you
make the decision. What is the ethical conflict? Why is this a
conflict? This paper is an exercise where you can take a
situation and apply ethical decision making to it.
The case studies that you can use for this paper are “The
Overcrowded Lifeboat” “Think Critically 1.1” and “Thinking
Critically 1.2.”

More Related Content

Similar to Important notes· NOTE it is usually fine and often encouraged i.docx

Assignment 1 Hypothetical Machine SimulatorCSci 430 Int.docx
Assignment 1  Hypothetical Machine SimulatorCSci 430 Int.docxAssignment 1  Hypothetical Machine SimulatorCSci 430 Int.docx
Assignment 1 Hypothetical Machine SimulatorCSci 430 Int.docxjane3dyson92312
 
Question 1 briefly respond to all the following questions. make
Question 1 briefly respond to all the following questions. make Question 1 briefly respond to all the following questions. make
Question 1 briefly respond to all the following questions. make YASHU40
 
Exercise1[5points]Create the following classe
Exercise1[5points]Create the following classeExercise1[5points]Create the following classe
Exercise1[5points]Create the following classemecklenburgstrelitzh
 
Python programming variables and comment
Python programming variables and commentPython programming variables and comment
Python programming variables and commentMalligaarjunanN
 
BTE 320-498 Summer 2017 Take Home Exam (200 poi.docx
BTE 320-498 Summer 2017 Take Home Exam (200 poi.docxBTE 320-498 Summer 2017 Take Home Exam (200 poi.docx
BTE 320-498 Summer 2017 Take Home Exam (200 poi.docxAASTHA76
 
Faculty of ScienceDepartment of ComputingFinal Examinati.docx
Faculty of ScienceDepartment of ComputingFinal Examinati.docxFaculty of ScienceDepartment of ComputingFinal Examinati.docx
Faculty of ScienceDepartment of ComputingFinal Examinati.docxmydrynan
 
Python programming - Functions and list and tuples
Python programming - Functions and list and tuplesPython programming - Functions and list and tuples
Python programming - Functions and list and tuplesMalligaarjunanN
 
Chapter3: fundamental programming
Chapter3: fundamental programmingChapter3: fundamental programming
Chapter3: fundamental programmingNgeam Soly
 
Cmis 102 Effective Communication / snaptutorial.com
Cmis 102  Effective Communication / snaptutorial.comCmis 102  Effective Communication / snaptutorial.com
Cmis 102 Effective Communication / snaptutorial.comHarrisGeorg12
 
Devry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-stringsDevry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-stringsnoahjamessss
 
Devry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-stringsDevry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-stringscskvsmi44
 

Similar to Important notes· NOTE it is usually fine and often encouraged i.docx (20)

Assignment 1 Hypothetical Machine SimulatorCSci 430 Int.docx
Assignment 1  Hypothetical Machine SimulatorCSci 430 Int.docxAssignment 1  Hypothetical Machine SimulatorCSci 430 Int.docx
Assignment 1 Hypothetical Machine SimulatorCSci 430 Int.docx
 
Question 1 briefly respond to all the following questions. make
Question 1 briefly respond to all the following questions. make Question 1 briefly respond to all the following questions. make
Question 1 briefly respond to all the following questions. make
 
MA3696 Lecture 9
MA3696 Lecture 9MA3696 Lecture 9
MA3696 Lecture 9
 
C++ Homework Help
C++ Homework HelpC++ Homework Help
C++ Homework Help
 
Data services-functions
Data services-functionsData services-functions
Data services-functions
 
Lab5
Lab5Lab5
Lab5
 
A01
A01A01
A01
 
Exercise1[5points]Create the following classe
Exercise1[5points]Create the following classeExercise1[5points]Create the following classe
Exercise1[5points]Create the following classe
 
Python programming variables and comment
Python programming variables and commentPython programming variables and comment
Python programming variables and comment
 
Rspec
RspecRspec
Rspec
 
Function
FunctionFunction
Function
 
BTE 320-498 Summer 2017 Take Home Exam (200 poi.docx
BTE 320-498 Summer 2017 Take Home Exam (200 poi.docxBTE 320-498 Summer 2017 Take Home Exam (200 poi.docx
BTE 320-498 Summer 2017 Take Home Exam (200 poi.docx
 
Faculty of ScienceDepartment of ComputingFinal Examinati.docx
Faculty of ScienceDepartment of ComputingFinal Examinati.docxFaculty of ScienceDepartment of ComputingFinal Examinati.docx
Faculty of ScienceDepartment of ComputingFinal Examinati.docx
 
Python programming - Functions and list and tuples
Python programming - Functions and list and tuplesPython programming - Functions and list and tuples
Python programming - Functions and list and tuples
 
C functions
C functionsC functions
C functions
 
Chapter3: fundamental programming
Chapter3: fundamental programmingChapter3: fundamental programming
Chapter3: fundamental programming
 
Cmis 102 Effective Communication / snaptutorial.com
Cmis 102  Effective Communication / snaptutorial.comCmis 102  Effective Communication / snaptutorial.com
Cmis 102 Effective Communication / snaptutorial.com
 
Devry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-stringsDevry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-strings
 
Devry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-stringsDevry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-strings
 
Presentation 2.pptx
Presentation 2.pptxPresentation 2.pptx
Presentation 2.pptx
 

More from wilcockiris

Barbara Silva is the CIO for Peachtree Community Hospital in Atlanta.docx
Barbara Silva is the CIO for Peachtree Community Hospital in Atlanta.docxBarbara Silva is the CIO for Peachtree Community Hospital in Atlanta.docx
Barbara Silva is the CIO for Peachtree Community Hospital in Atlanta.docxwilcockiris
 
BARGAIN CITY Your career is moving along faster than you e.docx
BARGAIN CITY Your career is moving along faster than you e.docxBARGAIN CITY Your career is moving along faster than you e.docx
BARGAIN CITY Your career is moving along faster than you e.docxwilcockiris
 
Barbara schedules a meeting with a core group of clinic  managers. T.docx
Barbara schedules a meeting with a core group of clinic  managers. T.docxBarbara schedules a meeting with a core group of clinic  managers. T.docx
Barbara schedules a meeting with a core group of clinic  managers. T.docxwilcockiris
 
Barbara schedules a meeting with a core group of clinic managers.docx
Barbara schedules a meeting with a core group of clinic managers.docxBarbara schedules a meeting with a core group of clinic managers.docx
Barbara schedules a meeting with a core group of clinic managers.docxwilcockiris
 
Barbara schedules a meeting with a core group of clinic managers. Th.docx
Barbara schedules a meeting with a core group of clinic managers. Th.docxBarbara schedules a meeting with a core group of clinic managers. Th.docx
Barbara schedules a meeting with a core group of clinic managers. Th.docxwilcockiris
 
Barbara Rosenwein, A Short History of the Middle Ages 4th edition (U.docx
Barbara Rosenwein, A Short History of the Middle Ages 4th edition (U.docxBarbara Rosenwein, A Short History of the Middle Ages 4th edition (U.docx
Barbara Rosenwein, A Short History of the Middle Ages 4th edition (U.docxwilcockiris
 
BARBARA NGAM, MPAShoreline, WA 98155 ▪ 801.317.5999 ▪ [email pro.docx
BARBARA NGAM, MPAShoreline, WA 98155 ▪ 801.317.5999 ▪ [email pro.docxBARBARA NGAM, MPAShoreline, WA 98155 ▪ 801.317.5999 ▪ [email pro.docx
BARBARA NGAM, MPAShoreline, WA 98155 ▪ 801.317.5999 ▪ [email pro.docxwilcockiris
 
Banks 5Maya BanksProfessor Debra MartinEN106DLGU1A2018.docx
Banks    5Maya BanksProfessor Debra MartinEN106DLGU1A2018.docxBanks    5Maya BanksProfessor Debra MartinEN106DLGU1A2018.docx
Banks 5Maya BanksProfessor Debra MartinEN106DLGU1A2018.docxwilcockiris
 
Banking industry•Databases that storeocorporate sensiti.docx
Banking industry•Databases that storeocorporate sensiti.docxBanking industry•Databases that storeocorporate sensiti.docx
Banking industry•Databases that storeocorporate sensiti.docxwilcockiris
 
BAOL 531 Managerial AccountingWeek Three Article Research Pape.docx
BAOL 531 Managerial AccountingWeek Three Article Research Pape.docxBAOL 531 Managerial AccountingWeek Three Article Research Pape.docx
BAOL 531 Managerial AccountingWeek Three Article Research Pape.docxwilcockiris
 
bankCustomer1223333SmithJamesbbbbbb12345 Abrams Rd Dallas TX 75043.docx
bankCustomer1223333SmithJamesbbbbbb12345 Abrams Rd Dallas TX 75043.docxbankCustomer1223333SmithJamesbbbbbb12345 Abrams Rd Dallas TX 75043.docx
bankCustomer1223333SmithJamesbbbbbb12345 Abrams Rd Dallas TX 75043.docxwilcockiris
 
Barbara and Judi entered into a contract with Linda, which provi.docx
Barbara and Judi entered into a contract with Linda, which provi.docxBarbara and Judi entered into a contract with Linda, which provi.docx
Barbara and Judi entered into a contract with Linda, which provi.docxwilcockiris
 
bappsum.indd 614 182014 30258 PMHuman Reso.docx
bappsum.indd   614 182014   30258 PMHuman Reso.docxbappsum.indd   614 182014   30258 PMHuman Reso.docx
bappsum.indd 614 182014 30258 PMHuman Reso.docxwilcockiris
 
Bank ReservesSuppose that the reserve ratio is .25, and that a b.docx
Bank ReservesSuppose that the reserve ratio is .25, and that a b.docxBank ReservesSuppose that the reserve ratio is .25, and that a b.docx
Bank ReservesSuppose that the reserve ratio is .25, and that a b.docxwilcockiris
 
Bank Services, Grading GuideFIN366 Version 21Individual.docx
Bank Services, Grading GuideFIN366 Version 21Individual.docxBank Services, Grading GuideFIN366 Version 21Individual.docx
Bank Services, Grading GuideFIN366 Version 21Individual.docxwilcockiris
 
Baldwins Kentucky Revised Statutes AnnotatedTitle XXXV. Domesti.docx
Baldwins Kentucky Revised Statutes AnnotatedTitle XXXV. Domesti.docxBaldwins Kentucky Revised Statutes AnnotatedTitle XXXV. Domesti.docx
Baldwins Kentucky Revised Statutes AnnotatedTitle XXXV. Domesti.docxwilcockiris
 
Bank confirmations are critical to the cash audit. What information .docx
Bank confirmations are critical to the cash audit. What information .docxBank confirmations are critical to the cash audit. What information .docx
Bank confirmations are critical to the cash audit. What information .docxwilcockiris
 
BalShtBalance SheetBalance SheetBalance SheetBalance SheetThe Fran.docx
BalShtBalance SheetBalance SheetBalance SheetBalance SheetThe Fran.docxBalShtBalance SheetBalance SheetBalance SheetBalance SheetThe Fran.docx
BalShtBalance SheetBalance SheetBalance SheetBalance SheetThe Fran.docxwilcockiris
 
BAM 515 - Organizational Behavior(Enter your answers on th.docx
BAM 515 - Organizational Behavior(Enter your answers on th.docxBAM 515 - Organizational Behavior(Enter your answers on th.docx
BAM 515 - Organizational Behavior(Enter your answers on th.docxwilcockiris
 
BalanchineGeorge Balanchine is an important figure in the histor.docx
BalanchineGeorge Balanchine is an important figure in the histor.docxBalanchineGeorge Balanchine is an important figure in the histor.docx
BalanchineGeorge Balanchine is an important figure in the histor.docxwilcockiris
 

More from wilcockiris (20)

Barbara Silva is the CIO for Peachtree Community Hospital in Atlanta.docx
Barbara Silva is the CIO for Peachtree Community Hospital in Atlanta.docxBarbara Silva is the CIO for Peachtree Community Hospital in Atlanta.docx
Barbara Silva is the CIO for Peachtree Community Hospital in Atlanta.docx
 
BARGAIN CITY Your career is moving along faster than you e.docx
BARGAIN CITY Your career is moving along faster than you e.docxBARGAIN CITY Your career is moving along faster than you e.docx
BARGAIN CITY Your career is moving along faster than you e.docx
 
Barbara schedules a meeting with a core group of clinic  managers. T.docx
Barbara schedules a meeting with a core group of clinic  managers. T.docxBarbara schedules a meeting with a core group of clinic  managers. T.docx
Barbara schedules a meeting with a core group of clinic  managers. T.docx
 
Barbara schedules a meeting with a core group of clinic managers.docx
Barbara schedules a meeting with a core group of clinic managers.docxBarbara schedules a meeting with a core group of clinic managers.docx
Barbara schedules a meeting with a core group of clinic managers.docx
 
Barbara schedules a meeting with a core group of clinic managers. Th.docx
Barbara schedules a meeting with a core group of clinic managers. Th.docxBarbara schedules a meeting with a core group of clinic managers. Th.docx
Barbara schedules a meeting with a core group of clinic managers. Th.docx
 
Barbara Rosenwein, A Short History of the Middle Ages 4th edition (U.docx
Barbara Rosenwein, A Short History of the Middle Ages 4th edition (U.docxBarbara Rosenwein, A Short History of the Middle Ages 4th edition (U.docx
Barbara Rosenwein, A Short History of the Middle Ages 4th edition (U.docx
 
BARBARA NGAM, MPAShoreline, WA 98155 ▪ 801.317.5999 ▪ [email pro.docx
BARBARA NGAM, MPAShoreline, WA 98155 ▪ 801.317.5999 ▪ [email pro.docxBARBARA NGAM, MPAShoreline, WA 98155 ▪ 801.317.5999 ▪ [email pro.docx
BARBARA NGAM, MPAShoreline, WA 98155 ▪ 801.317.5999 ▪ [email pro.docx
 
Banks 5Maya BanksProfessor Debra MartinEN106DLGU1A2018.docx
Banks    5Maya BanksProfessor Debra MartinEN106DLGU1A2018.docxBanks    5Maya BanksProfessor Debra MartinEN106DLGU1A2018.docx
Banks 5Maya BanksProfessor Debra MartinEN106DLGU1A2018.docx
 
Banking industry•Databases that storeocorporate sensiti.docx
Banking industry•Databases that storeocorporate sensiti.docxBanking industry•Databases that storeocorporate sensiti.docx
Banking industry•Databases that storeocorporate sensiti.docx
 
BAOL 531 Managerial AccountingWeek Three Article Research Pape.docx
BAOL 531 Managerial AccountingWeek Three Article Research Pape.docxBAOL 531 Managerial AccountingWeek Three Article Research Pape.docx
BAOL 531 Managerial AccountingWeek Three Article Research Pape.docx
 
bankCustomer1223333SmithJamesbbbbbb12345 Abrams Rd Dallas TX 75043.docx
bankCustomer1223333SmithJamesbbbbbb12345 Abrams Rd Dallas TX 75043.docxbankCustomer1223333SmithJamesbbbbbb12345 Abrams Rd Dallas TX 75043.docx
bankCustomer1223333SmithJamesbbbbbb12345 Abrams Rd Dallas TX 75043.docx
 
Barbara and Judi entered into a contract with Linda, which provi.docx
Barbara and Judi entered into a contract with Linda, which provi.docxBarbara and Judi entered into a contract with Linda, which provi.docx
Barbara and Judi entered into a contract with Linda, which provi.docx
 
bappsum.indd 614 182014 30258 PMHuman Reso.docx
bappsum.indd   614 182014   30258 PMHuman Reso.docxbappsum.indd   614 182014   30258 PMHuman Reso.docx
bappsum.indd 614 182014 30258 PMHuman Reso.docx
 
Bank ReservesSuppose that the reserve ratio is .25, and that a b.docx
Bank ReservesSuppose that the reserve ratio is .25, and that a b.docxBank ReservesSuppose that the reserve ratio is .25, and that a b.docx
Bank ReservesSuppose that the reserve ratio is .25, and that a b.docx
 
Bank Services, Grading GuideFIN366 Version 21Individual.docx
Bank Services, Grading GuideFIN366 Version 21Individual.docxBank Services, Grading GuideFIN366 Version 21Individual.docx
Bank Services, Grading GuideFIN366 Version 21Individual.docx
 
Baldwins Kentucky Revised Statutes AnnotatedTitle XXXV. Domesti.docx
Baldwins Kentucky Revised Statutes AnnotatedTitle XXXV. Domesti.docxBaldwins Kentucky Revised Statutes AnnotatedTitle XXXV. Domesti.docx
Baldwins Kentucky Revised Statutes AnnotatedTitle XXXV. Domesti.docx
 
Bank confirmations are critical to the cash audit. What information .docx
Bank confirmations are critical to the cash audit. What information .docxBank confirmations are critical to the cash audit. What information .docx
Bank confirmations are critical to the cash audit. What information .docx
 
BalShtBalance SheetBalance SheetBalance SheetBalance SheetThe Fran.docx
BalShtBalance SheetBalance SheetBalance SheetBalance SheetThe Fran.docxBalShtBalance SheetBalance SheetBalance SheetBalance SheetThe Fran.docx
BalShtBalance SheetBalance SheetBalance SheetBalance SheetThe Fran.docx
 
BAM 515 - Organizational Behavior(Enter your answers on th.docx
BAM 515 - Organizational Behavior(Enter your answers on th.docxBAM 515 - Organizational Behavior(Enter your answers on th.docx
BAM 515 - Organizational Behavior(Enter your answers on th.docx
 
BalanchineGeorge Balanchine is an important figure in the histor.docx
BalanchineGeorge Balanchine is an important figure in the histor.docxBalanchineGeorge Balanchine is an important figure in the histor.docx
BalanchineGeorge Balanchine is an important figure in the histor.docx
 

Recently uploaded

Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

Recently uploaded (20)

Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 

Important notes· NOTE it is usually fine and often encouraged i.docx

  • 1. Important notes · NOTE: it is usually fine and often encouraged if you would like to write one or more helper functions to help you write a homework problem's required functions. · HOWEVER -- whenever you do so, EACH function you define SHOULD follow all of the design recipe steps: first write its signature, then its purpose statement, then its function header, then its tests/check- expressions, then replace its ... body with an appropriate expression) · Remember: Signatures and purpose statements are ONLY required for function definitions -- you do NOT write them for named constants or for non-function-definition compound expressions. · Remember: A signature in Racket is written in a comment, and it includes the name of the function, the types of expressions it expects, and the type of expression it returns. This should be written as discussed in class (and you can find examples in the posted in-class examples). For example, ; signature: purple-star: number -> image · Remember: a purpose statement in Racket is written in a comment, and it describes what the function expects and describes what the function returns (and if the function has side-effects, it also describes those side-effects). For example, ; purpose: expects a size in pixels, the distance between ; points of a 5-pointed-star, and returns an image ; of a solid purple star of that size · Remember: it is a COURSE STYLE STANDARD that named constants are to be descriptive and written in all-uppercase -- for example, (define WIDTH 300) · You should use blank lines to separate your answers for the different parts of the homework problems. If you would like to add comments noting which part each answer is for, that is fine, too!
  • 2. · Because the design recipe is so important, you will receive significant credit for the signature, purpose, header, and examples/check-expects portions of your functions. Typically you'll get at least half-credit for a correct signature, purpose, header, and examples/check-expects, even if your function body is not correct (and, you'll typically lose at least half-credit if you omit these or do them poorly, even if your function body is correct). Problem 1 Start up DrRacket, (if necessary) setting the language to How To Design Programs - Beginning Student level, and adding the HTDP/2e versions of the image and universe teachpacks by putting these lines at the beginning of your Definitions window: (require 2htdp/image) (require 2htdp/universe) Put a blank line, and then type in: · a comment-line containing your name, · followed by a comment-line containing CS 111 - HW 3, · followed by a comment-line giving the date you last modified this homework, · followed by a comment-line with no other text in it --- for example: ; type in YOUR name ; CS 111 - HW 3 ; last modified: 2016-02-08 ; Below this, after a blank line, now type the comment lines: ; ; Problem 1 ; Note: you are NOT writing a function in this problem -- you are just writing two compound expressions. Sometimes, when a function returns a number with a fractional part, especially a number such as the result of (/ 1 3), it becomes difficult to give an expected value in a check-
  • 3. expect that is "exact enough" for a passing test. Yet, if the expected value is "close enough" to the actual value, we might like to be able to decide that that is good enough for our purposes. That is why, along with several additional check- functions, BSL Racket also includes check-within, which expects three arguments: · the expression being tested, which in check-within's case should be of type number · an approximate expected value for that expression · a number that is the largest that the difference between the expression and the expected value can be and still consider this to be a passing test. (In math, this maximum difference is also called a delta.) As a quick example, what if you simply wanted to test whether BSL Racket's predefined pi was within .001 of 3.14159? This check-within expression can do this, and show that it is: ; passing test (check-within pi 3.14159 .001) But if you want to know if its predefined pi is within .000001 of 3.14159, this check-within expression can do this, and show that it is not: ; failing test (check-within pi 3.14159 .000001) Just to practice writing a few expressions using check-within: · write a check-within expression that will result in a passing test for testing what the expression
  • 4. (/ 1 3) ...should be roughly equal to; · write a check-within expression that will result in a passing test for testing what the expression (* pi 10 10) ...should be roughly equal to. Problem 2 Next, in your definitions window, after a blank line, type the comment lines: ; ; Problem 2 ; Write a function that expects a temperature given in Celsius, and returns the equivalent Fahrenheit temperature. Write such a function cels->fahr, using the following design recipe steps: (It is reasonable to search the web or an appropriate reference for the conversion formula for this -- consider it problem research.) 2 part a Write an appropriate signature comment for this function. 2 part b Write an appropriate purpose statement comment for this function. 2 part c Write an appropriate function header for this function (putting ... ) for its body for now). 2 part d Write at least 2 specific tests/check-expect or check- within expressions for this function. 2 part e Only NOW should you replace the ... in the function's body with an appropriate expression to complete this function. Run and test your function until you are satisfied that it passes its tests and works correctly. Finally, include at least 2 example calls of your function (such that you will see their results) after your function definition.
  • 5. Problem 3 Next, in your definitions window, after a blank line, type the comment lines: ; ; Problem 3 ; Write a function name-badge that expects a name, and returns an image of a "name badge" for that name: a shape (of your choice of shape and color) with the given name in its middle. Somehow make the width of your "badge" be based on the name's length. (hint: remember that string-length expects a string and returns how many characters is in that string.) 3 part a Write an appropriate signature comment for this function. 3 part b Write an appropriate purpose statement comment for this function. 3 part c Write an appropriate function header for this function (putting ... ) for its body for now). 3 part d Write at least 2 specific tests/check-expect or check- within expressions for this function. 3 part e Only NOW should you replace the ... in the function's body with an appropriate expression to complete this function. Run and test your function until you are satisfied that it passes its tests and works correctly. Finally, include at least 2 example calls of your function (such that you will see their results) after your function definition. Problem 4 We've mentioned the make-color function, which expects three arguments, each an integer number in [0, 255], representing its red, green, and blue values, respectively, and returns a color made up of those red, green, and blue values. Optionally, it can
  • 6. take a 4th argument, another integer in [0, 255], giving the transparency of that color (0 is completely transparent, 255 has no transparency). But - to play with this is a little inconvenient, because to "see" what the returned color looks like, you have to use the resulting color in some image function. Design a function color-swatch that expects desired red, green, and blue values, and returns a solid rectangle image whose color has those red, green, and blue values. (You can pick a reasonable constant size for this rectangle.) OPTIONAL: if you'd like, you can also design this to expect a transparency value, also. 4 part a Write an appropriate signature comment for this function. 4 part b Write an appropriate purpose statement comment for this function. 4 part c Write an appropriate function header for this function (putting ... ) for its body for now). 4 part d Write at least 2 specific tests/check-expect or check- within expressions for this function. 4 part e Only NOW should you replace the ... in the function's body with an appropriate expression to complete this function. Run and test your function until you are satisfied that it passes its tests and works correctly. Finally, include at least 2 example calls of your function (such that you will see their results) after your function definition. Problem 5 Next, in your definitions window, type the comment lines: ; ; Problem 5 ; 5 part a
  • 7. Remember that place-image expects a scene expression for its 4th argument. It can be convenient to use a named constant for this scene, especially if you will be using it in a number of place-image expressions and if it might itself include several unchanging elements. You are going to be creating some scenes in later parts of this problem, so for this part, define the following named constants: · define a named constant WIDTH, a scene width of your choice (except it should not be bigger than 1300 pixels). · define a named constant HEIGHT, a scene height of your choice (except it should not be bigger than 400 pixels). · define a named constant BACKDROP, an unchanging, constant scene that will serve as a backdrop scene in some future problems. · its size should be WIDTH by HEIGHT pixels · it should include at least one visible unchanging image of your choice (and you may certainly include additional visible unchanging images if you wish). · (you may certainly include additional named constants, also, if you wish!) 5 part b Consider a "world" of type number -- starting from a given initial number, in which that number changes as a ticker ticks, and in which the number determines what is shown where (or how) in a scene. For this world, big-bang's to-draw clause will need a scene- drawing function that expects a number, and produces a scene based on that number. Don't get too far ahead of yourself, here! Just decide what image(s) is/are going to be ADDED to your BACKDROP scene from 5 part a based on a number value. Do something that is at least slightly different than the posted class examples. (For example, an image could be placed in the BACKDROP whose size depends on that number -- and/or an image's x-coordinate within the BACKDROP could be determined by that number -- and/or an image's y-coordinate
  • 8. within the BACKDROP could be determined by that number -- and/or an image's color could be determined by that number -- and/or some combination, letting it determine both the x- and y- coordinate, for example.) Write an appropriate signature comment for this function. 5 part c Write an appropriate purpose statement comment for this function. 5 part d Write an appropriate function header for this function (putting ... ) for its body for now). 5 part e Write at least two specific examples/tests/check- expect expressions for this function, placed either before or after your not-yet-completed function definition, whichever you prefer. 5 part f Finally, replace the ... in this function's body with an appropriate expression to complete it. For full credit, make sure that you use your BACKDROP scene from 5 part aappropriately within this expression. Run and test your function until you are satisfied that it passes its tests and works correctly. Also include at least 2 example calls of your function (such that you will see their results) after your function definition. 5 part g What change do you want to happen to your world number as the world ticker ticks? Will it increase by 1? decrease by 1? Increase and/or decrease by varying amounts? Decide how your world number will change on each ticker tick. If your change can be done by a built-in function such as add1 or sub1, that is fine. Otherwise, using the design recipe, develop this function, that expects a number and produces a number. · (if you develop your own function here, REMEMBER to do all the steps you have been doing for the other functions in this
  • 9. homework -- first write its signature, then its purpose statement, then its function header, then its tests/check-expect expressions, then replace its ... body with an appropriate expression) Then write a big-bang expression consisting of an initial number, and a to-draw clause with the name of your scene- drawing function from 5 parts b-f, and an on-tickclause with the name of your (new or existing) number-changing function -- something like: (big-bang initial-number-you-choose (to-draw name-of-your-scene-drawing-function) (on-tick name-of-your-number-changing-function)) (By the way, you can also change the speed of the ticker in this on-tick clause if you would like to -- give it an optional 2nd expression, a number that is aticker-rate-expression, and the ticker will tick every ticker-rate-expression seconds.) Now you should see something changing in your scene, and now you are done with this problem. Business Ethics Rubric I will be looking for the following items in your Case Study Analysis. I. Developing a Practical Ethical Viewpoint (Have you clearly picked and stated an Ethical Viewpoint) (You need to choose one for each case study) A. Utilitarianism B. Universal Ethics C. Ethical Relativism D. Virtue Ethics II. To help you choose the ethical theory do the following (By looking at the moral situations): A. Interpret what is right and wrong according to each of the four theories
  • 10. B. Give an argument that each theory might provide C. State your own assessment of the strengths of each theory D. State the weakness of each theory III. Step 1: Analyze the Consequences. Who will be helped by what you do? Who will be harmed? What kind of benefits and harm are we talking about? Who will be helped by what you do? Who will be harmed? Step 2: Analyze the actions Consider all the options from a different perspective, without thinking about the consequences. How do the actions measure up against moral principles like honesty, fairness, equality, respecting the dignity of others, and people’s rights? (Consider the common good.) Are any of the actions at odds with those standards? If there’s a conflict between principles or between the rights of different people involved, is there a way to see one principle as more important than the others? Which option offers actions that are least problematic? Step 3: Make a decision Make a decision. Take both parts of your analysis into account, and make a decision. This strategy at least gives you some basic steps you can follow. 1. What are the facts? Know the facts as best you can. If your facts are wrong, you’re liable to make a bad choice. 2. 2. What can you guess about the facts you don’t know? Since it is impossible to know all the facts, make reasonable assumptions about the missing pieces of information. 3. 3. What do the facts mean? Facts by themselves have no meaning. You need to interpret the information in light of the values that are important to you. 4. 4. What does the problem look like through the eyes of the people involved? The ability to walk in another’s shoes is essential. Understanding the problem through a variety of perspectives increases the possibility that you will choose
  • 11. wisely. 5. 5. What will happen if you choose one thing rather than another? All actions have consequences. Make a reasonable guess as to what will happen if you follow a particular course of action. Decide whether you think more good or harm will come of your action. 6. 6. What do your feelings tell you? Feelings are facts too. Your feelings about ethical issues may give you a clue as to parts of your decision that your rational mind may overlook. 7. 7. What will you think of yourself if you decide one thing or another? Some call this your conscience. It is a form of self- appraisal. It helps you decide whether you are the kind of person you would like to be. It helps you live with yourself. 8. 8. Can you explain and justify your decision to others? Your behavior shouldn’t be based on a whim. Neither should it be self-centered. Ethics involves you in the life of the world around you. For this reason you must be able to justify your moral decisions in ways that seem reasonable to reasonable people. Ethical reasons can’t be private reasons. Please do at least the required pages. Please do double spaced. Please give headings for idea. For example, Introduction—Explain the case study the facts. Body of Paper—This is where you state the different ethical theories, strengths and weaknesses, which theory you choose, why you choose that theory, what would you do, do you agree with what was done. Conclusion—Summary of what you told me in the paper. In short, please choose a case study from the book. Read the case study. Analyze the case study under the four theories. Talk about the strengths and weaknesses of each theory. Choose the theory that best matches with your worldview. Why did you
  • 12. pick this theory. Under Step 3 these questions will help you make the decision. What is the ethical conflict? Why is this a conflict? This paper is an exercise where you can take a situation and apply ethical decision making to it. The case studies that you can use for this paper are “The Overcrowded Lifeboat” “Think Critically 1.1” and “Thinking Critically 1.2.”