BTE 320-498/ Summer 2017
Take Home Exam
(200 points)
Due 6/30/2017 – 11:59pm (No extensions)
Presentation in class Friday June 30 at 5:30 PM
Required Part
1. (a) Explain in English what the following function will do. Explain how it works.
(b) What will be the output if the following calls are made:
whoknows(2) =
whoknows(15) =
whoknows(-3) =
(c) Write a function digitize (using loops) that takes two parameters: one integer
parameter and one bool parameter. The function would print the integer one digit
at a time each on a separate line. If the bool parameter passed were true, the
function would print the digits from the most significant digit to the least
significant. Otherwise, it would print it in the reverse order (least significant to
most significant).
Function Call Output
digitize(1758,true) 1
7
5
8
digitize(1758,false) 8
5
7
1
(d) Write a function (without using loops) that reverses the digits in an integer
and prints out the integer in this reverse form. It is not necessary to calculate the
value of the reverse integer, just print out the digits in reverse order. The function
should be called reverse. Remember to explain your functions, either by adding
comments or using pseudocode or showing how you derived the function. State
any assumptions you make.
2. (a) Write a function, printdivisors, that takes a single integer parameter and prints
all the numbers less that the parameter that are divisors of the parameter (i.e.
divides it without a remainder) including 1. So printdivisors(6) will print 1,2,3.
Note you may use a wrapper function or default parameters.
(b) Write a function, sumdivisors, that takes a single integer parameter and returns
the sum of all the divisors of the parameter (including 1). So sumdivisors(6) will
return 6 as 1+2+3=6. Note you may use a wrapper function or default parameters.
(c) Write a function, allperfects, that takes two parameters, each an integer, in any
order and prints out all the perfect numbers between the lower parameter and the
higher parameter. A perfect number is one is which the sum of its divisors is equal
to the number itself.
Remember to explain your functions, either by adding comments or showing how
you derived the function. State any assumptions you make.
3. (a) Write a recursive function, printZeros, which prints out a series of zeros. The
function takes one parameter and prints out the number of zeros specified by the
parameter. So printZeros(4) will print: 0000 and printZeros(2) will print 00.
(b) Write a recursive function, printZPattern, which prints out a pattern of zeros
as follows:
printZPattern(3) outputs:
000
printZPattern(1) outputs:
0
printZPattern(4) outputs:
0000
00 000
0 00
0
(c) How would you modify your second function to print a mirror pattern, such as
(you do not have to code this one, just explain):
printZPattern2(3) outputs:
000
00
0
00
000
Re ...
BTE 320-498 Summer 2017 Take Home Exam (200 poi.docx
1. BTE 320-498/ Summer 2017
Take Home Exam
(200 points)
Due 6/30/2017 – 11:59pm (No extensions)
Presentation in class Friday June 30 at 5:30 PM
Required Part
1. (a) Explain in English what the following function will do.
Explain how it works.
(b) What will be the output if the following calls are made:
whoknows(2) =
whoknows(15) =
whoknows(-3) =
(c) Write a function digitize (using loops) that takes two
parameters: one integer
parameter and one bool parameter. The function would print the
integer one digit
at a time each on a separate line. If the bool parameter passed
were true, the
function would print the digits from the most significant digit to
the least
significant. Otherwise, it would print it in the reverse order
2. (least significant to
most significant).
Function Call Output
digitize(1758,true) 1
7
5
8
digitize(1758,false) 8
5
7
1
(d) Write a function (without using loops) that reverses the
digits in an integer
and prints out the integer in this reverse form. It is not
necessary to calculate the
value of the reverse integer, just print out the digits in reverse
order. The function
should be called reverse. Remember to explain your functions,
either by adding
comments or using pseudocode or showing how you derived the
function. State
any assumptions you make.
2. (a) Write a function, printdivisors, that takes a single integer
3. parameter and prints
all the numbers less that the parameter that are divisors of the
parameter (i.e.
divides it without a remainder) including 1. So printdivisors(6)
will print 1,2,3.
Note you may use a wrapper function or default parameters.
(b) Write a function, sumdivisors, that takes a single integer
parameter and returns
the sum of all the divisors of the parameter (including 1). So
sumdivisors(6) will
return 6 as 1+2+3=6. Note you may use a wrapper function or
default parameters.
(c) Write a function, allperfects, that takes two parameters, each
an integer, in any
order and prints out all the perfect numbers between the lower
parameter and the
higher parameter. A perfect number is one is which the sum of
its divisors is equal
to the number itself.
Remember to explain your functions, either by adding
comments or showing how
you derived the function. State any assumptions you make.
4. 3. (a) Write a recursive function, printZeros, which prints out a
series of zeros. The
function takes one parameter and prints out the number of zeros
specified by the
parameter. So printZeros(4) will print: 0000 and printZeros(2)
will print 00.
(b) Write a recursive function, printZPattern, which prints out a
pattern of zeros
as follows:
printZPattern(3) outputs:
000
printZPattern(1) outputs:
0
printZPattern(4) outputs:
0000
00 000
0 00
0
(c) How would you modify your second function to print a
mirror pattern, such as
(you do not have to code this one, just explain):
printZPattern2(3) outputs:
000
00
0
00
000
5. Remember to explain your functions, either by adding
comments or showing how
you derived the function. State any assumptions you make.
4. Suppose you have a function, myfib, declared as follows:
def myfib( n):
which returns the nth Fibonacci number, using this function:
(a) Write a function, myfibseries, that also takes a single
parameter, n, and prints out
the entire sequence of Fibonacci numbers up to and including n,
with a comma
between each (do NOT use loops).
(b) Write a function, myfibseriesR, that also takes a single
parameter, n, and prints out
the entire sequence of Fibonacci numbers up to and including n,
with a comma
between each, but in REVERSE order (do NOT use loops).
(c) Write a function, myfibsum, that takes a single parameter, n,
and prints out the
sum of all the Fibonacci numbers up to and including n (do
NOT use loops).
6. 5.
(a) Write a program that reads 10 numbers from the user as
input and loads them into
a list.
(b) Add a function search that takes one int parameter –n- and
searches for all the
occurrences of n in the list.
6. Guessing Game(max of 3 tries): Write a program to simulate
the following guessing
game using the random_in_range function :(Basically, the
program should generate a
secret number in the range the use specifies and it guides the
user until she gets it right or
exhausts 3 attempts.
7. The output of your program should be something like this:
Enter min of range
10
Enter max of range
20
Guess a number between 10 and 20
Guess a Number:
17
You went too low
Guess a Number:
18
You got it!
Please do ONLY ONE of the following two options
Option I (25 points)
In this question you are required to use Python to solve a
problem of your choice. This could be a
finance, accounting, science or any business, engineering or
medical application. A game of your
choice is ok too (no Graphical User interface would be
required). If you are interested in writing a
multi-user game, come see me and I will guide you or look up
how sockets could be defined – there
8. are many examples on the web. Of course, you can look up how
to do things, but you need to use
YOUR OWN CODE. Your program should include:
1- Classes (use hiding, getters and setters, multiple constructors
and methods).
2- Use functions – make your main very short. Try not to use
any long detailed logic in main
and modularize your application.
3- Input and Output files.
4- Make your own data set. You can even use random functions
to create data sets or use a
data set that would be deemed appropriate for your application.
5- Use static variables in classes so that you would give an
entity an auto-incremented ID as
needed.
6- When using a data set, make sure you demonstrate your
knowledge of sorting and
searching (no need to prompt the user if you don’t want to, but
feel free to design your
application as you deem appropriate).
7- For a very large extra credit, get a raspberry pi, configure it,
and run the application on it.
8- You must use some containers (lists and/or maps).
9- You can use recursion if you know how and if you need it.
10- You may use any of the functions I have on BB in the code
or from the book.
Come up with something cool or something useful. It does not
9. have to be long but it must show
what you learned in the course. Please make sure it is all yours
from the idea to the
implementation. I made this so open ended so that you gauge it
to how much you want to do and
you are able to do – but it MUST be yours – don’t copy – it will
not work. Come up with your own
idea. Of course, no two ideas will come out similar, and if they
do, the implementations will be
completely different. Also, this must be something that has
significance – as an idea and a
prototype implementation. It can’t be something trivial. In other
words, don’t give me a hello world
program and expect that you will get a grade for it
Option II (25 Points)
Write a 5-6 page paper (in Latex https://www.sharelatex.com
(Preferred)) about ONE of the
following topics (It must be in your own words):
1- Compare Python with Java, C++ and Ruby and how
programming languages and tools are
evolving (cloud, mobility, IoT, features, enhancements,
complexity, performance,
openness, etc), and when the use of one would be more
appropriate than the others (if you
such preference exists).
10. 2- C++ 11 and C++ 14 features and enhancements – you must
explain in your own words –
don’t copy. Do the research. How does this make C++ compared
to Python, Java and
Ruby? Do you think using boost libraries place C++ ahead of
those languages when it
comes to abstraction? Why is C++ is still so popular in some
settings? What are those
settings and when would you use it over any of the other
languages above?
3- Advances in AI – Technical Perspective. What is new? What
are the recent technical
advances and challenges? How the technical landscape of
Computational Sciences is well
suited for yet another leap of advancements in Artificial
Intelligence research and
capabilities?
4- Functional Programming – with examples of how different
modern languages support
functional programming – with examples of your own.
5- The Internet of Things Development - You can discuss the
different tools and platforms or
you can discuss IoT applications in a specific domain (business,
engineering or medical).
6- Cloud computing Development platforms (any of these
topics: architecture, possibilities,
scale, application – why it makes business sense, etc). You will
need to discuss what
services such as Azure, AWS or Bluemix offer and how this is
revolutionizing software
development. You can also approach this from an IaaS, PaaS,
SaaS perspective but you
11. need to discuss the stack of tools and the architecture along
with some applications –
possibly in a related domain (use of a business case scenario is
perfectly fine).
7- Social Media Analytics – benefits, and what it means to
business.
8- Big Data, Data Mining and Machine Learning – you could be
general or use industry
specific examples – but you need to discuss tools and
architecture.
9- Any other topic – It must be related to programming,
application development or specific
technologies in a specific domain.
You must appropriately cite your sources in appropriate format.
You can use IEEE format or LNCS
format for your paper – or you can choose another format as you
deem appropriate.
Grade Distribution
Required Part
Question 1: 30 points
Question 2: 30 points
Question 3: 30 points
Question 4: 30 points
Question 5: 10 points
Question 6: 10 points
Optional Part
12. Option I : 60 points
Option II : 60 points
• Submission – code pasted in a word document with
screenshots for every output.
No screenshots of output will get a zero score for the question.
You must submit
before presentation in class at 5:30 on Friday June 30th at 5:30.
You can submit
again before 11:59 pm.
• Please submit on time and the right way- check your
documents before you
submit. Wrong file submissions will get a 30% penalty.
• Late submissions will get a zero – no discussion. No work to
be shown during
the presentation will get a zero.
Charles King
Assignment #4
White Collar Crime
AOJ-303 MAY 2017
Essay Questions
1. Define enterprise crime and discuss the relation of syndicated
and organized crime with governmental crime, White Collar
13. Crime, and finance crime.
2. What is contrepreneurial crime, what are the main attributes
of professional criminals who practice it, and what are the
parallels between these professional criminals and white collar
offenders?
3. List and discuss the specific facets of the modern
technology/computer revolution which promote White Collar
Crimes, and which facts impose constraints on such crime.
4. List and compare enterprise crime, contrepreneurial crime,
and technocrime in terms of their basic attributes, then identify
some of the key areas in which these different forms of crime
intersect.
QUESTION 1
Enterprise crime is a type of white collar crime where the
culprits act professionally compared to other forms of crime.
(Friedrichs) Enterprise crimes are in two forms; organized
crimes and syndicated crimes. Syndicated crimes involve a wide
range of activities of a certain group. The US syndicated
crimes originated in the 1800s as the criminal organizations
called “mafia”. The group was later called the Italian crime
organizations after some groups migrated to America from Italy.
The group was known for its crime activities like running
legitimate businesses, garbage collection, running night clubs
and restaurants (Braithwaite, 2005). The group’s success was
through bribing the police and corruption in court cases. Mafia
was also associated with labor racketeering in America. This
involves manipulating the labor movements in the aim of
affecting the related businesses and companies. It also leads to
contradiction of workers’ rights which leads to a great loss to
the business and the workers. Labor unions are very much
exposed to organized crime groups who plan to take advantage
of the workers’ pension fund, their wealth and the allowances.
Organized crimes are broader crimes which involves associated
crimes of different people for the purpose of making profit for
example the business people, police and politicians. Syndicated
14. crimes and organized crimes are used interchangeably.
Different professionals can plan an illegal enterprise in order to
gain profit or for their own benefit. The organized crime groups
are made by a number of people mostly working under the same
department in a company. These individuals mostly have similar
characteristics (Shover, 2008). They are self-perpetuating. The
group is resistant to change and they only want to live with the
old styles this is because change would reduce the chances of
carrying out their criminal activities. For instance if an
accountant in a company has not been accounting for petty cash
in an organization implementing petty cash record file will
prevent him from using the company’s money for his own gain.
Organized crimes members of the group have limited members
and hierarchal form of leadership. The organized crimes
members are few in a group so that they are able to make quick
decisions. Small groups are also easy to manage and divide the
profit. The groups’ leadership is hierarchal to ensure that there
are those with the commanding voice who dictates what the rest
should do, when, how and where. Each member of the group has
his or her own role to play in conducting the crime. The
members are united with vows of secrecy to remain silent
despite the threats by the organization or from the police
department during crime investigation. For instance when one
person is caught and taken for questioning, he or she is not
supposed to give any information concerning the group. Leaking
information is violating the vows. The group aims at controlling
the illegal enterprise by use of force, aggression or bullying in
order to acquire goals. The group’s success results from
providing services where the demand is high but no legal means
of acquisition (Shover, 2008). When the group is caught they
tend to protect themselves by bribing the management or legal
system. The group creates network to ensure communication
among the members. Research has shown that many of the
organized crimes groups practice similar activities like money
lending but use different methods of gaining profit.
Government crimes involve illegal activities by the political
15. body. The government despite being the law makers in the
country is also involved in injustice practices like corruption
and terrorism. Many government crimes are not publicly stated
mostly due to secrecy entailed in the practices. White collar
crimes are deceptions executed by business and government
professionals. Most of these white collar crimes are
characterized by violation of trust, deception or cover ups. The
culprits are not involved in applying physical force. They aim at
committing crimes secretly to avoid losing their jobs, money or
property (Braithwaite, 2005). These culprits are investigated by
the FBIs who use intelligence to critically analyze the crimes.
Financial crimes are can be described in two forms; dishonest
activities that are used to benefit the individuals and those
activities which are not dishonest but facilitate the process of
getting the benefit. Financial crimes are committed by two main
groups of individuals; organized groups and the professionals in
the company or an institution. These crimes be money
laundering, terrorist financing, electronic fraud and information
forgery. For instance a bank may be robed by either an
organized group or the employees by use of accounts hacking.
The four forms of crimes are interrelated that is the enterprise
crimes, financial crimes and white collar crimes. The enterprise
criminals are responsible for conducting the white collar crimes
and financial crimes. Government crimes seem to be different in
that the crimes involve the government officials but can still
involve organized groups who plan to perform some illegal
activities for their own benefits.
QUESTION 2
Contrepreneurial crimes are illegal activities committed by
professionals outside their professions. There are crimes
committed with disrespect of the law outside the occupational
con text. These acts are related to the white collar crimes due to
the fact that they are all committed by professionals. Some of
the frauds include insurance deceptions, loan acquisition
forgery among others. The contrepreneurial activities are
16. conducted in a peaceful manner without physical violence. The
culprits use deception and violation of trust in order to acquire
benefit. These crimes are called crimes of trust as they violate
the trust the individual has with the company which he or she is
committing the crime from (Shover, 2008). These types of
crimes are different from the street crimes which involve
contact of the person and the person he or she is stealing from.
For instance, when snatching someone’s purse it means that the
person stealing the purse must be present to perform the act.
Activities involved in street crimes mostly involve application
of force to implement the crime. For instance robbery with
violence where armed people invade a place to steal and use
force to ask for whatever they intended to steal if the owner
resists.
The participants of the contrepreneurial crime are always
cautious of the offence to be identified. They are very much
concerned of the detection of the offence than the executor.
Other occupational crimes are also identified by the same
characteristic where the executors of the crimes are very much
concerned of their offences to be detected and not them being
caught. Many of these activities are done by the professionals
themselves who present their fake documents hoping that they
will not be identified. For instance when forging insurance or
loan documents the executor presents the documents
individually in the normal procedures undertaken by the rest.
The individual may start by greeting the insurance agency then
present the documents. He or she seems to engage in a lot of
communication and interaction with the insurance agency in the
aim of gaining trust (Nelken & David, 2004). When there is
trust it is very difficult to identify the forgery or any other form
of mistrust. Additionally contrepreneurial crimes do not incur
force or any form of pressure to the company or the
organization one is stealing from. All their activities are
peaceful orderly. No one can detect from physical observation
that a person is intending or has committed a crime. They do not
create public attention. In case the culprit is caught he is
17. questioned individually and separately in order to have a clear
observation on the documents that have been presented.
Professional criminals are very similar to the white collar
criminals. This is due to the fact that both are committed by
professionals who are qualified in different occupations. Both
crimes do not involve force or any form of physical
manipulation by the perpetrators. They all use trust violation
and deception to get their benefits (Quinney & Richard, 2007).
Both types of criminals are concerned with large companies and
organizations where the professional criminals tend to assume
legitimate on some of the services like insurances and loans and
have a need to acquire the fund illegally. White collar offenders
perform their crimes within the occupations which may be very
easy to acquire the money because the individual works within
the company but on the other hand the person is risking his or
her job.
QUESTION 3
Technology in the modern world has developed in a very high
rate. Every activity is now being carried electronically.
Technology advancement has lead to improvement of various
ways of carrying out different activities. There have also been
faster methods of producing bulk quantities of goods. Trade and
marketing has also been of beneficiary due to introduction of
online marketing; e-business. Communication systems have
been developed to make communication very fast and effective
to all people. Introduction of computers in the world has been
of advantages and disadvantages (Gilbert Geis, and Colin Goff,
2005). In the good side of computers everyone is enjoying its
services most especially the companies and different
institutions. Many companies install software into their
computers so that they can be able to execute the activities of
their choice. For example accounting software can help the
company to perform its calculations and keeping financial
records.
There are different challenges of white collar crimes in the
technology development stages. White collar crimes are
18. deceptions executed by business and government experts. Most
of these white collar crimes are characterized by violation of
trust, deception or cover ups. The culprits are not involved in
applying physical force. They aim at committing crimes secretly
to avoid losing their jobs, money or property. White collar
crimes are the crimes committed by professionals of a particular
company or an organization. These crimes do not involve
violence. The professionals have their way of carrying out the
activities. They use deceptions and cover ups to commit their
crimes. They may also engage in activities that violates the trust
between them and the company. The white collar crimes are
mostly related to the company’s activities like frauds in
accounting, trade and marketing. The main crimes include
money laundering, corporate fraud and security deception.
Many cases of white collar crimes are investigated the FBIs who
are well trained to use their intelligence to detect all kinds of
crimes in companies. The white collar crimes are a great risk of
the individual’s job and property (Shover, 2008). This is
because in most cases when one is caught engaging in such
illegal activities, private investigations starts immediately. The
FBIs investigate all the records within the company so that they
identify the crime. They then investigate the role of the culprit
and the relationship of the company with the culprit. If the
individual is found guilty he or she is charged in a court of law.
The FBI must have the right information and evidence to accuse
anyone of any crime.
Introduction of computer software exposes the company to a lot
of frauds. There are many computer specialists who are able to
hack the systems and control the different operations
undertaken by the company. For instance there are very many
crimes of hacking bank systems and stealing very large amounts
of money from the accounts. Other challenges include cyber
crimes where people interfere with other people’s documents
which may interfere with critical information for instance
tampering with case evidences (Gilbert Geis, and Colin Goff,
2005). An individual may want to win a case in court that he
19. fears there are evidences against him and opt to commit another
computer crime. Introduction of mobile phones introduced a
crime of cyber-bullying. This includes harassments of an
individual by another with private identity. The individual who
is harassed does not know the sender who may be calling or
sending threatening messages. This crime that is punishable by
the law. Some people use the social media to abuse others
mostly the powerful heads in a country like the politicians. If
the matter is reported in country it is punishable by the law.
Most of the computer crimes are very challenging to curb this is
because the technology is very advanced and some people are
also very skilled in that it is hard to detect the culprits.
QUESTION 4
Enterprise crime involves crimes that major on small scale and
are mostly concerned with day to day dealings. Some of the
crimes involved are trafficking, snatching items among others.
They are mainly divided into organized and syndicated crimes
that interchange due to their similarities. Enterprise crime is a
type of white collar crime where the culprits act professionally
compared to other forms of crime (Shover, 2008). Enterprise
crimes are in two forms; organized crimes and syndicated
crimes. Syndicated crimes involve a wide range of activities of
a certain group. Organized criminals have various
characteristics. One of them is that they have organized
network. These groups of people need coordination in their
activities so that they may have constructive plans of getting
benefits from their activities. They also have hierarchical form
of leadership with divided roles for every individual member of
the group. This is crucial in ensuring that the group is
successful in the illegal engagements.
Techno crimes involve the illegal activities that are mostly
carried out through the computers. These can also be defined as
white collar crimes which are developed due to technology
advancement. Some of these crimes involve hacking; spam,
spyware, cyber bullying and cyber crime among others. These
20. crimes developed due to technological advancement. Innovation
of computers has very advantages which help in production and
marketing but on the other hand there are various challenges
which have become a great threat to businesses and
organizations (Ngai, 2001). Cyber bullying involves aggression
of people through calls, messages and emails. Some people send
messages to people claiming they will kill someone if a certain
deal is not accomplished. Others send messages asking people
to deposit some amounts of money in to their accounts
otherwise they will destroy their property. These messages have
scaring messages which makes people to send the required
money. Most people who practice cybercrimes have their
identification hidden in that they cannot be traced.
All the crimes despite the level of stealing are punishable by the
law. The FBI is on their toes to investigate the culprits of all the
registered crimes (Gilbert Geis, and Colin Goff, 2005). The
profession of an individual or the position the person holds in
the government cannot be an excuse to charge a culprit in a
court. If a person is identified by crime he or she should be
charged according to the crime committed. There should be no
discrimination where common people are charged while the
people in the government are not. Many of the government
crimes are not fully investigated. This is because of lack of
enough evidence. Many government officials temper with the
evidences making investigation process to give up on the
matter.
White collar crimes are difficult to identify compared to the
street theft. Use of trust violation and deception by the
professions requires a lot of intelligence. The professionals take
risks of being caught in the act of deceit. When they are
performing their illegal activities their main worry is that the
act may not be identified and that they may not be caught;
professionals carryout crimes openly. The only thing that they
ensure is to maintain a high interaction with the server. This
creates trust between them and the server. The white collar
criminals also need to familiarize themselves with their
21. companies’ systems in order to identify the best ways to get
benefit and how to get it (Ngai, 2001). All the crimes need self
giving individuals. Participating in crimes requires one to risk
all that he or she has in order to fight to get more. It is a risk
because a person can be caught and the court rules against all
his wealth, job and freedom. Finally, crimes are called crimes
due to violation of the law. Therefore all the crimes violate the
law and if any person is fixed there should be penalty to be
taken.
Work cited
Braithwaite, John. "White collar crime." Annual Review of
Sociology 11.1 (2005): 1-25.
Friedrichs, David O. Trusted Criminals. Belmont (Calif.):
Wadsworth, 2011. Print.
Nelken, David, ed. White-collar crime. Aldershot,, England:
Dartmouth, 2004.
Ngai, E. W. T., et al. "The application of data mining
techniques in financial fraud detection: A classification
framework and an academic review of literature." Decision
Support Systems 50.3 (2011): 559-569.
Quinney, Richard. Class, state, and crime: On the theory and
practice of criminal justice. D. McKay Company, 2007.
Shover, Neal. "White-collar crime." The handbook of crime and
punishment (2008): 133-58.
Sutherland, Edwin Hardin, Gilbert Geis, and Colin Goff. White
collar crime: The uncut version. Vol. 58. New Haven, CT: Yale
University Press, 2003.