1- MPG Calculator: Write a function that takes three numbers (starting mileage, ending mileage, and gallons purchased to fill the gas tank) and returns the MPG for

that fillup. Your program should be robust enough to allow users to enter the mileage figures in either order (starting/ending or ending/starting).

You do NOT need to write input code to prompt for values, nor do you need to include your main() code for testing. Just give me the function definition itself.

Score will be based on code correctness and naming.

2- The speed of light (c) in a vacuum is a constant

c space equals space 3 space x space 10 to the power of 8 space space m divided by s

equal to the product of frequency (f) and wavelength (lambda).

c space equals space f space lambda

Write a method called getFrequency() that takes a wavelength (in meters) and returns the frequency( in Hertz).

3- Here is that class definition for a Rectangle. Write a mutator method for the width that sets the new width value only if the input is greater than or equal to

zero, otherwise it throws an exception that says “Negative height of N is not allowed” where N is the value submitted.

public class Rectangle {

private double height = 0.0;
private double width= 0.0;


4- Write the Java code that defines a Desk class. It should have dimensional properties, number of drawers, a brand name, a model name, a price, the date of

manufacture, and a style (like Victorian, Scandinavian, Chinese, or Early American).

It should have methods for opening and closing drawers, with the code enforcing a rule being that you cannot have more than one drawer open at a time. In other words,

attempting to open one drawer will automatically close the one that was open before. This implies you’ll need to keep track of which drawer is open, if any.

In the interest of time you do not need to provide the setters and getters.


Blog 1. Choice A./Attention. Stroop Task.

1.    Give full reference of the article in the APA format.

2.    Before moving on to the next section give a definition to the word congruent:


3.    Complete the experiment and report your results:

a. Reaction time mean for Congruent Condition:   __________ms

b. Reaction time mean for Incongruent Condition: __________ms

**Attach actual results to the printout copy.

4. Questions to answer:

a.    What is the most commonly accepted explanation of why most people are slower on incongruent trials than on congruent trials in the Stroop task?
b.    What strategy could one use to overcome the Stroop Effect observed in this demonstration?
c.    Name three tasks that are automatic for most people.  Explain why they are automatic.

5. Create glossary for 6 terms from the original Stroop’s study article and at the end give reference to where your definitions are taken from.

Automaticity is the ability to do things without occupying the mind with the low level details required. It is usually the result of learning, repetition, and


Psychology Wikia (n.d.). Retrieved on June 1, 2015 from

6. Search for a media file that you think is relevant to this study.  Describe the media, justify your choice by describing its relevance, and provide full APA

reference of the media file. For correct referencing, refer to APA materials or the website.

Experimental Blog Guidelines

Preparatory Stage:

(A)    Make sure that experimental software is accessible and functional on your computer
(B)    Read the chapter(s) covered in class.
(C)    Make sure that you are familiar with the APA writing style requirements (at least the basics). Check out the folder titled APA resources within Course Files

folder on Blackboard.
(D)    Locate the article that described the original study. Create a full reference (check the APA Publication Manual).
(E)    Allow sufficient time to complete the experiment, and do at least a draft of the writing.

Working Stage:
1.    Read the documentation and the questions before you conduct the experiment in CogLab 2.0 database that could be found under Experimental Database for Blogs in

Course Files folder on Blackboard.
2.    Find the relevant experiment (the title is identified on the assignment page), open it, read instructions, and complete the experiment.
3.    Copy your results (the printout of the results should be attached to the blog).
4.    Follow instructions on BB within the Blog (Blog 1-A/B, Blog 2-A/B, Blog 3)for the rest of the tasks you have to include in your blog entry.
5.    Answer questions using Read the chapter(s) covered in class.
6.    Create a glossary of 4 Cognitive Psychology terms from the original article and give definitions. Cite the sources of where the definitions come from.  The

definitions should come from a resource related to psychology.
7.    Find a media file (newspaper or magazine article, YouTube video, a poster that you might have come across, a passage in the book that you are reading). Provide

full reference to this source according the APA standards. Write at least 6 sentences describing what the media file is about and why you find it relevant to the

experimental data or to the issue in quest within Cognitive Psychology.
8.    Submit your answer to the Blackboard blog folder “CogPsySci Blog” as your entry in the APA format (title page, entry, numbered rubrics, abstract is ABSOLUELY

NOT necessary and should NOT be a part of it).
9.    Print out your document and bring to class. All documents have to be submitted before the beginning of class (9:00 A.M on Monday) on submission due dates and

posted on the blog page on Bb by Sunday at midnight.


We often forget that the APA has rules not only about formatting, citations, and referencing but also about grammar, punctuation, logics of presentation, and style.
(1) Thus, any vague, ungrammatical, style violating, and other written faults are considered not only a violation of the language rules, but the APA guidelines as

The APA guide clearly states to avoid passive voice, incomplete and run-on sentences, and stylistic awkwardness.  While the latter comes with practice, the former

three are regular expected writing requirements.
The APA guide does not allow contractions in verbs. As in, you should not write as follows:
“The APA guide doesn’t allow contractions, and you shouldn’t write using them.”
Let’s = Let us

(2) APA formatting rules require a title page, double-spaced writing with 1 inch margins with font size 12 Times New Roman, Arial, Cambria, or Garamond. Your paper

should have page numbers and title in CAPS appearing on each page in the header.

(3) On your title page in the left top (header) corner you should have words:

and NOT ANY of the following: Running Head, Running Header, Running header… : ALL THESE ARE INCORRECT
On your title page in the right top (header) corner you should have a page number.

In the center of your title page you should have three lines:
– Title: Blog Entry One: Your Topic Title

–     Your First and Last Name
-Your Institution Affiliation. In your case it should state:
College of Staten Island CUNY

I strongly encourage you to use this link:
to see what exactly you should end up with.

(4) Starting your blog.
Please start with announcing the general topic of your blog: introduce your readers to what is there to come. Think of how you would like to see it written by

others for you to understand.

For example,
Goldstein (2011) in the discussion of attention describes the phenomenon of automatic processing. Automatic processing is defined as “…” (citation with Author’s Last

Name ONLY – no first names, no abbreviations, followed by year, followed by page number if quotations are used, e.g. Smith (2003)).  In order to investigate this issue

further, I located the original work by Stroop (1935).  Stroop (1935) conducted a number of experiments that became crucial for understanding of the phenomenon of

automatic processing, and processes of attention in general. The goal of Stroop’s study was to investigate….. He achieved that by creating a series of tasks that look

trivial at first.  All participants had to do was to name colors of the stimuli presented. Stimuli were presented in three different conditions… etc…
It is well known…
It has been proved…
A lot of studies claim…
as well as similar construction require citations. And once again, if your citations uses quotation marks, page number should appear in a citation.

Then, follow the structure by answering these questions one at a time:
What is the main objective of the research? Clearly state the hypothesis/question asked by the researchers.
Who were the participants?
What were the tasks? If there are several tasks: describe each one separately and clearly.
Imagine that you are explaining all of these to the high school students; avoid using words you do not understand.
Spell out all acronyms, even if you assume that everyone knows what it means.
For example,
CCI (Collateral Cognitive Investigations)
PROMPT (Permanent Ramifications Of Mechanically Pronounced Techniques)
Now describe the results: What was the main result? How do researchers themselves evaluate the result?
How do you evaluate the result? It’s your blog after all.
(5) Now conclude your blog:
In concluding relate the study/research/experiment/discussion to the issues discussed in class:
How does this particular study relate to the chapter? What new things did you learn? What didn’t fit? Is there anything unexpected about the results that you did not

anticipate based on the in-class discussion and chapter readings.
As a final point: pick one statement that really stunned you, surprised you, or you find the most important for the understanding of the phenomenon, and write a little

excerpt: 3-5 sentences expanding your thoughts on that issue.

Now, the main body of your blog is done – the length of this should be no less than one and a half – two pages, if double-spaced. This estimate can, of course, vary in

either direction. Keep your writing clear and concise but do not skip important points, or do not add unnecessary or redundant information.
In addition, state that you were able to locate additional popular media resources that discuss the same point, e.g. a YouTube video. Write one sentence describing the

main point of the media and its relation to the study you have just presented in your blog.

•    You are done with the big written part.

(5) The Reference page: is a very important part of this assignment to save you from being accused of plagiarism. Give full reference to the works you used: the

article itself, and all of the media sources.
Please, spend some time studying the format of the reference page. All the resources are available to you. If you are still in doubt, I hope you know where to find me.
Disclaimer: Starting with the blog2 I will penalize you for incorrect citations and referencing. After all, I assume that there is only one article that you have to

create a clean reference of.

(6) Lastly, on a separate page create a glossary of 6 terms that are unfamiliar to you. In doing so, please do not use words that you obviously know the definition

for: psychology, and such. But under no circumstances should you use non-existent made up definitions. Indicate the source of your definitions: dictionary, the

article, Goldstein, etc. These may not appear on the Reference page.

(7) Last part: READ everything that you wrote, or ask someone to read it for you to correct misspellings, missed grammar issues, and unclear style and logics.

Post-Completion Stage:
(A)    Proofread all the sentences. You will be graded on grammar, punctuation, and style as well as contents itself.
(B)    Submit your file onto BB as an attachment to the Blog page.
(C)    Print out a copy of the file to bring to class. Make sure you have all the parts of the assignment intact. Attach the results at the end of the assignment.

find the cost of your paper