Free Essay

Counting Money

In:

Submitted By tdeep77
Words 598
Pages 3
COS 126 General Computer Science S

Programming Exam 1

is test has 1 question. You have 50 minutes. The exam is open book, o u may use code from your programming assignments or the Introduc va booksite. No communication with any non-staff members is permitt Moodle. Write out and sign the Honor Code pledge before tu

pledge my honor that I have not violated the Honor Code during this e

Name: NetID:

--------- Sig

Total

P01 TT P01A TT P01B TT P01C TT P02 TT P03 TT P04 TT P05 WF P06 WF P06A WF P06B WF P06C WF

1

oblem. Write a program Intersects.java that reads in a sequence ut, plots them using standard drawing, computes the circle that inters cles, plots that circle in red, and prints to standard output the circle a t it intersects. ur program will be graded on correctness and clarity (including comme tial credit for a program that solves part of the problem (e.g., reads i cles) than one that does not compile.

ometry. We specify a circle in the plane by its center (x, y) and its ra cle j if the Euclidean distance between their centers is less than or equal consider two nested circles (one circle is completely contained inside t

(xi , yi , ri)

(xj , y j , rj) (xi , yi , ri)

intersects: √(x - x )2 + (y - y )2 ≤ (r + r )

does not intersect: √(x -

i j i j i j i

ut and output formats. The input consists of an integer N follo mbers (the x- and y-coordinates of the center of the circle, followed b circles using standard drawing. Plot the circle that intersects the mo re is a tie, plot the first circle in the input that has this property. Fi number of other circles it intersects.

% more intersects10.txt
10
.3 .4 .20
.1 .1 .02
.7 .5 .10
.3 .9 .08
.3 .8 .06
.4 .9 .06
.1 .6 .03
.5 .5 .12
.4 .4 .15
.9 .3 .02

% java Intersects < inte
(0.5, 0.5, 0.12)
3

bmission. Submit Intersects.java via Moodle.

2

oblem. Write a program Contains.java that reads in a sequence ut, plots them using standard drawing, computes the circle that contai d plots that circle in red, and prints to standard output the circle and tains. ur program will be graded on correctness and clarity (including comme tial credit for a program that solves part of the problem (e.g., reads i cles) than one that does not compile.

ometry. We specify a circle in the plane by its center (x, y) and its r cle j if the Euclidean distance between their centers is less than or eq inus the radius of circle j.

(xi , y i , ri)

(xj , yj , rj)

(xi , yi , ri)

contains: √(x - x )2 + (y - y )2 ≤ (r - r )

does not contain: √(x -

i j i j i j i

ut and output formats. The input consists of an integer N follo mbers (the x- and y-coordinates of the center of the circle, followed by cles using standard drawing. Plot the circle that contains the most oth a tie, plot the first circle in the input that has this property.
Finally, mber of other circles it contains.

% more contains10.txt
10
.8 .3 .15
.5 .5 .20
.3 .5 .15
.5 .3 .10
.5 .5 .05
.4 .5 .35
.4 .6 .05
.5 .5 .02
.1 .6 .05
.9 .3 .02

% java Contains < contai
(0.4, 0.5, 0.35)
6

bmission. Submit Contains.java via Moodle.

Similar Documents

Free Essay

Accountability

...decisions and processes for completing a task, also comes into play; finally, the obligation to report, explain, and be answerable to resulting consequences when implementing those actions is quite significant. To put it simply, when taking accountability for something, you are acknowledging and assuming responsibility for your actions.If I go further in depth with this particular topic, we can see that this system of accountability can actually be created by breaking down the very word "accountability," into separate synonyms (words that have the same or similar meaning) and can be categorized as such. The word "count," in "accountability" implies the action of finding the number of elements of a finite set of objects. The traditional way of counting consists of continually increasing a (mental or spoken) counter by a unit for every element of the set, in some order, while marking (or displacing) those elements to avoid visiting the same element more than once, until no unmarked elements are left; if the counter was set to one after the first object, the value after visiting the final object gives the desired number of elements....

Words: 308 - Pages: 2

Premium Essay

Research Information

...The past of Accounting is deep to dig. The planet has been dependent on counting since long time. Pervasive then in just about all societies far and wide, the specialty of counting is as old as three thousand years back. Counting of many items, even that of creatures were carried out throughout that time. Tally imprints are human progress' presentation into counting. Be that as it may some place after some time, humans touched base with the making of number words. From that point, the thought of numbers developed and the remaining story is well known to all, Math was conceived. Top 3 Accounting Software The count of accounting software ends in 3 figures. But we are not gonna see them all, instead the top 3, in fact the best 3 in no order, based on the usage, preference and features. ● ● ● Marg marched into the global market in the year 1990. The biggest plus of Marg is that they have developed separate accounting software for several industries particularly for Retail, Trade ...etc. The most renowned and successful of them is the software for Pharmaceutical industry. Around 6 lac users utilize the services of Marg products worldwide. ● ● ● Busy first came into limelight at the event IT Asia 1994 and then into the global market in the year 1997. The biggest plus of Busy is the inventory management function. Around 6 lac users utilize the services of Busy accounting software worldwide. ● ● ● Quickbooks...

Words: 539 - Pages: 3

Free Essay

Dell

...accounting who the number two are accounting firm in all of Sydney, we would like to offer you a special valued customer deal. We’ve noticed you have not yet given us your tax return for the previous business year and we are wondering why? We here at Turner and sons counting have been doing your tax return Mr Singh for over five years now. We have always done a terrific job and gotten you the best possible tax refund we could manage to get, and always on time and promptly. If you wish to redeem this special offer contact us today on (02) 9675 4215 and ask for Jerry Minksel, make sure to mention this letter when our call about the discount. As a special incentive to our valued customers we here at Turner and Sons Accounting are offering a 20% discount on tax returns for a limited time only and only to our valued customers. Hurry this offer is only available until October 15th. As a valued customer of our organisation of Turner and sons accounting who the number two are accounting firm in all of Sydney, we would like to offer you a special valued customer deal. We’ve noticed you have not yet given us your tax return for the previous business year and we are wondering why? We here at Turner and sons counting have been doing your tax return Mr Singh for over five years now. We have always done a terrific job and gotten you the best possible tax refund we could manage to get, and always on time and promptly. If you wish to redeem this special offer contact us today...

Words: 355 - Pages: 2

Free Essay

Adahfjdhlaf

...Bibliography Bahador, K. M., Haider, A., & Saman, W. W. (2012). European, Mediterranean & Middle Eastern Conference on Information Systems 2012. Retrieved from ISEing: http://www.iseing.org/emcis/emcis2012/EMCISWebsite/proceedings/120.pdf Chao, H., & Foote, P. (2012, March 19). Are We Ready for Accounting Information Systems in the Cloud? Retrieved from Accounting Today: http://www.accountingtoday.com/news/Accounting-Information-Systems-Cloud-62048-1.html Fineberg, S. (2012, November 5). Survey: Cloud and Mobile Top Change Drivers for Tax and Accounting Profession. Retrieved from Accounting Today: http://www.accountingtoday.com/accounting-technology/news/Cloud-and-Mobile-Top-Change-Drivers-for-Tax-and-Accounting-Profession64551-1.html Jeff, D. (2012, November 5). Accounting profession at tech tipping point, Wolters Kluwer exec says. Retrieved from Journal of Accountancy: http://www.journalofaccountancy.com/News/20126801 State University of New York at Buffalo . (2012, January 12). New Media and External Accounting Information: A Critical Review. Retrieved from Social Science Research Network: http://papers.ssrn.com/sol3/papers.cfm?abstract_id=1984051 Arnold, J., Blisard, B., & Duggan, J. (2012). Dealing with the Implications of Accounting Change. Financial Executive, 28(9), 36-41. Shamszadeh, B., & Sharif, A. (2012). Computerized Accounting Information Systems versus Security Threats. Journal Of Academic Research In Economics, 4(1), 69-79. Moorthy...

Words: 285 - Pages: 2

Free Essay

Casinos vs. Card Counters: the Law and Reality

...Casinos vs. Card Counters: The Law and Reality Contents Page Description 3 Introduction 4 Card Counting Systems 4 MIT Blackjack Team 5 Is Card Counting Legal? 6 The Right to Ban Skilled Players 7 Casino Countermeasures 7 Griffin Investigations, Inc. 9 Face Recognition Systems 9 Bloodhound Blackjack Monitoring System 10 Changing the Rules 12 “Backrooming” 13 Conclusion 14 References Blackjack is the only casino game that when played perfectly has odds in favor of the player instead of the house. The only way to play blackjack perfectly is to use a strategy called card counting, where a player will keep track of the number of high cards and low cards that have been used from a deck to give them a better idea of what card valuesvalue cards may come out next. Because of this casino operators have over the years attempted to get legislation passed to have card counting made illegal, then lobbied to have the law on their side to allow them to barban known card counters from their casinos. Card counting was devised in the 1950’s by a group of blackjack experts and mathematicians. This will swing the odds from 10% or so in the favor of the house to a 2% advantage for the player. Even though it is a very small number of players who can master this very difficult system, the casinos have always attempted to find new ways to make sure that these experts were not able to keep the odds in their favors. The casino considerscasinos consider...

Words: 2907 - Pages: 12

Premium Essay

The Movie - 21

...by writing an essay that will make him stand out from other applicants. Recognizing Ben’s intelligence, his professor invites him to join his card counting club. Ben joins the team with the intention to do it until he can pay his tuition. As the team’s fortune grows, Ben becomes greedy, at which point, his luck turns into adversity and he is left with nothing except an adventurous experience to dazzle the scholarship administrator; successfully securing the Robinson scholarship. Was this success truly merited, or were Ben’s unethical actions simply overlooked. Based on ethical and social welfare philosophies, it is clear that modern society would not applaud him for such behaviour. Utilitarianism suggests that an individual’s actions ought to yield the greatest good for the greatest number of people. Ben discards this theory when he continues to count cards after acquiring sufficient funds to pay for his tuition. At this point, his motives are triggered out of greed and self-interest and no longer for the greater good. Further, Ben places his university, and ultimately his medical career in jeopardy when he undermines the power and influence of his professor by disobeying his instructions. He finds that his winnings have been stolen and learns that his professor has academically failed him. Ben’s unhealthy addiction to money and his rebelliousness has left him penniless, incapable of graduating, and as a result, unable to become a doctor to help a great number of people...

Words: 591 - Pages: 3

Free Essay

The Meaning of the Term Tamim

...A Patchwork of Time Michael Lev Introduction Contained within the Torah is a unique understanding of two fundamental concepts, that we tend to define quantitatively, and with little relation between them: that is, the concept of “wholeness” and that of “time.” We usually understand the word “wholeness” (tamim), as implying a state of perfection. However, is this a mathematical perfection, or a qualitative one? Likewise, when we speak of units of time, is it a specific duration of time that we have in mind, or rather, a quality of time that defines its worth? Furthermore, can we find a connection between these two concepts? My hope in the following essay, dear reader, is to arouse your intellectual curiosity, as we seek to answer this question. As I was contemplating the mitzvah of Sefirat HaOmer in an attempt to find fresh insights, my attention was drawn to the phrase, “seven whole weeks.” I considered these words over and over, not knowing exactly where my thoughts would lead me, and found myself making associative connections between the various examples of “wholeness,” found in the Torah. The natural inclination to discover a unifying principle within all these examples raised a question in my mind as to the meaning of “seven whole weeks.” In attempting to answer this question, I concluded that the Torah appoints a value to time beyond its mere length, but also, to the synthesis of comparable moments that form a period of time that is more beneficial, and therefore “higher...

Words: 2180 - Pages: 9

Free Essay

Logic and Applications

...Looking at the new gaming table we need to address the problem of card counting. This has been an issue over the past years and to eliminate it we need to understand how counting can be done in the first place. Counting cards is being able to track the relationship between the high valued cards and the low. The strategy with this is to be able to play as others do without being recognized as a counter. By this I will use the poker face, many will hem and haw over their decisions and a well groomed counter can do this without being noticed by others. What is needed is one that can see the faces of the players and calculate how their expressions play into the game. A way to be able to read faces is to learn how to count cards yourself. Having the basic strategy and understanding will help to develop one into seeing into the future of players. We can go further with this and develop a dealer who can spot a player of this caliber more easily if they understand statistics along with full on counting skills. At this time we need to have a group of people and begin training them to count cards. By doing this along with teaching a statistical aspect of the problem we can begin to have dealers who are able to spot basic card counters at a glance. For training we will use High-Low, this will help to train at a faster rate. High-Low the 2-6 are valued at +1, and the 10s and Aces are counted as -1. Note that there are the same amount in each group: 2,3,4,5,6 and 10,J,Q,K,A. The 7,8...

Words: 392 - Pages: 2

Premium Essay

Advantages and Disadvantages of E-Voting

...speed, less cost, and flexibility are the main advantages. Following are the descriptions of the advantages. • Convenience : With the well-designed software and system, the voters can simply use his voting equipment with the minimal time and skill to finish the voting process. • Mobility : Voters can cast their votes at a specific polling place, home, or any place in which they can get access to the internet. People can even use the mobile device such as cell phone or PDA to vote. There is no restriction on the location. • Tally Speed : Once the voting time is over,the computer can immediately calculate the result of the election. It is much faster than the traditional ballot counting method operated by people. • Less Cost : Compared to paper ballot voting,electronic voting saves money from reducing the personnel expense, expense for location management and administrationfee, etc. In the beginning, the investment expense of building up the electronic voting system would be very high. But after the system is built up, the total expense would be reduced to be much lower than paper ballot voting. • Flexibility : Electronic voting system can be designed to support a variety of...

Words: 666 - Pages: 3

Free Essay

Duggars and Kardashians

...Introduction The two shows, 19 Kids and Counting and the Kardashians are two reality shows that are aired in the United States. Reality shows are meant to show the real side of the celebrities or the people whom the audience admires. They become popular because people believe that the celebrities are showing the true side of their personality in the reality, whereas they are not. Well, this is a heated debate as to whether the real side of the personalities is shown or not, it is out of the scope of this paper to discuss this debate. This paper will only compare and contrast these two reality shows. Discussion 19 kids and counting is a reality show that includes the Duggar family. The family appeared in a number of TLCs and also in the Discovery Health serial which is aired for an hour. In Discovery Health, mostly Michelle’s deliveries were covered. Jim and Michelle and husband and wife and have 19 kids till now. When Michelle gave birth to her first child, she and Jim decided to use contraceptives and take precautions because they didn’t want another child so early. Even after the use of contraceptives, Michelle conceived and gave birth to twins. This is when the couple decided that they would not use contraceptives again and will be happy with God’s will. The Duggar family is religious and says that whatever God will grant them, they will be happy with the same. The reality show is about the life of the Duggars as to how they live together with so many...

Words: 550 - Pages: 3

Free Essay

Thesis

...2.4 LOCAL LITERATURE 2.4.1 Electronic Voting Literature Review Computer scientists who have done work in, or are interested in, electronic voting all seem to agree on two things: * Internet voting does not meet the requirements for public elections * Currently widely-deployed voting systems need improvement Voting on the Internet using every day PC's offers only weak security, but its main disadvantages are in the areas of anonymity and protection against coercion and/or vote selling. It's such a truly bad idea that there seems to be no credible academic effort to deploy it at all. The Presidential elections of 2000 brought national attention to problems with current American methods of casting and counting votes in public elections. Most people believe that the current system should be changed; there is much disagreement on how such changes should be made. The MIT/Caltech researchers [1] “see a promising future for electronic voting, despite its problems today” (under a few conditions). They advocate using the methods currently in use which result in the lowest average numbers of “uncounted, unmarked, and spoiled ballots,” like in-precinct optical scanning. Their report even proposes a framework for new voting system with a decentralized, modular design. Other researchers have done work in electronic voting; while they may not explicitly mention voting from remote poll sites, their work is nonetheless relevant to any effort at designing or implementing...

Words: 4590 - Pages: 19

Free Essay

M5L1 Mingo Jessa 2tx

...ABSTRACT The aim of this study is to design a computerized voting system based upon the electoral process adopted in Pamantasan ng Lungsod ng Maynila. In recent years, information technology has greatly affected all aspects of life, and to a large extent, this includes politics. In order to choose people to various positions different methods have been set up, with researchers continually trying to find improvement to the existing methods. The most recent method to be devised is electronic voting (e-voting). It is meant to phase out outdated paper ballot, punched cards and other mechanical voting systems with paperless electronic or online voting systems. Computerized voting systems endeavour to make elections simple while reducing the total cost of the election. Designing an air-tight and reliable computerized voting system is therefore a great task, in that, the system that must be developed must protect the privacy of the voter, be easily understood and used by the entire voting populace - no matter who they are or where they come from. TABLE OF CONTENTS Chapter I The Problem and its Background | | Introduction | 1 | Background of the Study | 2 | Objective of the Study | 5 | General Objectives | 5 | Specific Objectives | 6 | Statement of the Study | 6 | Significance of the Study | 7 | Scope and Limitations of the Study | 8 | Scope of the Study | 8 | Limitations of the Study | 9 | | | Chapter II Review of Related...

Words: 383 - Pages: 2

Premium Essay

Adaptive Lesson Plan

...dysfunction, dyslexia, and developmental aphasia. This does not include the learning problems that are primarily associated with visual, hearing or motor disabilities, cognitive impairment, emotional disturbance, or that of environmental, cultural, or economic disadvantages” (SLD, n.d.). Teachers and parents may look for the following patterns in students of specific learning disabilities: •Short attention span, unable to concentrate on a task for very long. •Disorganized in the book and materials •Unable to follow along or often appears to be daydreaming. •Student has difficulty understanding the meaning of the assignment and when it needs to be completed by. •Difficulty in solving multiple math problems. •Difficulty learning the counting system. •Easily upset or frustrated with assignment After researching about...

Words: 3537 - Pages: 15

Free Essay

Chapter 2

...theoretical and conceptual framework to fully understand the research to be done and lastly the definition of terms for better comprehension of the study. Related Literature All computer scientists who have done work in or are interested in electronic voting seem to agree that online voting does not meet the requirements for public elections and that the current widely-deployed voting systems need improvement. Voting on the Internet has disadvantages based on the areas of secrecy and protection against coercion and/or vote selling. It's such a truly bad idea that there seems to be no credible academic effort to deploy it at all. The Kenyan General elections of 2007 brought national attention to problems with current methods of casting and counting votes in public elections. Most people believe that the current system should be changed; there is much disagreement on how such changes should be made.c really can't trust any code which we did not create ourselves. Therefore, they tend to be extremely suspicious of proprietary voting machines and their makers who insist that we should “just trust [them].” Neumann gives a list of suggestions for "generic voting criteria" which suggests that a voting system should be so hard to tamper with and so resistant to failure that no commercial system is likely to ever meet the requirements, and developing a suitable custom system would be extremely difficult and prohibitively expensive. A voting machine must produce human-readable hardcopy paper...

Words: 1779 - Pages: 8

Premium Essay

Fatsfit

...Information Flows 1. Mark the main flows of goods and money in the diagram (above) and employ a key or table of descriptive elements to explain your answer. 1 | Customers pay money to buy goods | 2 | Stores receive money from customers and submit payments to HQ for scrutiny | 3 | HQ pays supplier for received goods | 4 | Supplier delivers goods to warehouse as the orders from HQ | 5 | Warehouse delivers goods to store to replenish repertory | 6 | Store gives good to customer to exchange money | Customer Questions (focus on the customers and FastFit boxes) 2. a) List the specific items of information that are usually gathered at the POS (Point of Sale terminal or cash register) and recorded when a customer checks out (excluding obtaining the identity of the customer which is covered in Q3)? i. Data ii. Time iii. The price of good iv. The total payment v. Category of goods vi. Name of good vii. The quantity of good b) What are three important uses of this information at the store by the store manager and by headquarters management – a total of six uses? (use a table) (It is important that you give different responses/uses for store manager and HQ) item | Important uses | Store manager | By finding the more popular goods being sold, managers can make more orders for those goods and promote similar kinds of goods to make more profits | | By counting the quantity of good, store manager can replenish stock in...

Words: 1003 - Pages: 5