Adam Cap

  • About
  • Mail
  • Archive/Search

12th Grade – AP Computer Science

schoolwork | Class … see also: 12th Grade – English / 4th Grade / CHM 1112 (General Chemistry Lab I) / PHY 1042 (General Physics Lab II) / 11th Grade – English – American Literature / BIO 1011 (Biology I: Cells)

AP Java Programming Project: ATM Machine

↘︎ May 30, 2006 … 1′ … download⇠ | skip ⇢

For my end of the year project, I chose to design and program a virtual ATM machine. The program uses the Account class from Chapter 4, the Lockable interface from Chapter 5, IStream, and the ATM_Machine class, which is the main part of the program. ATM_Machine first stores an array of Account objects. These objects are used to represent different peoples’ bank accounts. Each Account object is passed a person’s name, their account number, their current balance, and their password.

The program then asks for your account number. Because there is no way for me to implement an actual debit card and scanner, you have to type out your account number yourself. For example, type “55554” for the account number when prompted. Next the program checks to see if you inputted a valid account number with the method, boolean isValidAccountNumber(int accountNumber). It is passed in the account number you entered. It then checks through the array of accounts to see if the number you entered matches up with any of the accounts. If it does, the boolean will be true. If not, it will be false and ask you to try again. “55554” is not a valid account number, so now try “55555” so you can move on. The method saves a placeholder for the index of the Account object that you are accessing, so you can use it later in the program.

Next it will ask for your password. For example, type “5554”. The program then will check to see if the password is correct using the method isValidPassword(int password). This method checks to make sure the password entered matches up with the password passed in as the parameter of the Account object. If it is correct, the boolean becomes true and you can pass forward in the program, if incorrect, the boolean will be false and you will have to try again. Now type “5555”, which is the correct password.

Once the correct account number and password combination is entered, the methods in Account will now unlock. Lockable is in place to make sure there is no way you can bypass the code to access an account. You must enter the right account number and password for the methods to unlock so that they are accessible. This would be similar to the security in a real ATM machine, in that you can’t access someone’s account unless they are logged in.

Next you will be prompted to either select check your balance, withdraw, deposit, or quick cash (which is set to automatically withdraw $20). If you select “Check Balance”, it will simply show your current balance. If you select “Withdraw”, you will be prompted to enter how much money you would like to withdraw. If you select “Deposit”, the program will ask how much money you would like to deposit. Finally, if you select “Quick Cash”, it will automatically withdraw $20 from your account. Once you complete your selection, it will print a virtual receipt, then log you out by locking Account.

Me

circa 2017 (29 y/o)

about adam

Jump…

  • 06 May 30: AP Java Programming Project #12th Grade – AP Computer Science #Dr. Paul Burgmayer #Great Valley High School
  • 05 Sep 11: Risks of Computing #12th Grade – AP Computer Science #Dr. Paul Burgmayer #Great Valley High School
  • 05 Aug 29: My Math Autobiography #12th Grade – AP Computer Science #Dr. Paul Burgmayer #Great Valley High School

More from…
Dr. Paul Burgmayer (Teacher) / Great Valley High School (School) / schoolwork (Post Type)

Risks of Computing

↘︎ Sep 11, 2005 … 4′ … download⇠ | skip ⇢

Many people don’t recognize that along with ethics in the real world, we have ethics in the cyber world. There are rules and laws on the Internet just like there are rules and laws in the real world. When people are on the Internet, they feel like they are anonymous, and they do whatever they feel like. For example, when elementary and middle school students were polled, almost half of the students believed that hacking wasn’t a crime. People just don’t believe that there are rigid rules that apply to using the Internet. They don’t think there are any consequences to their actions because no one knows who they are, and also because if anyone were to find out who they were, there is a great distance between where people live. They don’t think they would be contacted or found. This lack of understanding the laws regarding the use of the Internet leads to a risk of computing for the unsuspecting everyday user of the information highway.

Attackers (or hackers) on your computer can claim to have the same Internet protocol (IP) address as someone else. This is called IP spoofing. This would allow them to make illegal actions under the identity of someone else. This would allow them to do thing they shouldn’t be doing and they would not be caught. Whoever the IP address belongs to could be accused of doing things they didn’t do. The hacker could also take control of the user’s console and that user would not know. This is called IP session hijacking. The user would just be logged off their system and be allowed to log back on, while in the meantime the hacker can go through their e-mail, run any programs, and steal information among other things.

Computer users are also at risk to “unauthorized access” attacker. In these types of attacks, the hacker will use some resources on your computer that they should not have access to. One way the hacker does this is by executing commands illicitly. They could read your files and send e-mail to people under your name, which they should not be able to do. They could also do worse things, like changing your IP address and making your computer shut down every time it is booted up.

Another type of unauthorized access attack is confidentiality breaches. Hackers can steal your information and use it against you. For example, if you are in a business, they could take some idea your company came up with, and sell it to one of your competitors. They could also steal some of your personal information and release it to the public. This could be very damaging to your reputation.

The last type of unauthorized access attack is destructive behavior. There are two types of this attack. “Data diddling” is when a hacker messes with data in your saved files. For example, they may change a few numbers around in your spreadsheet or change the numbers in your account for auto-depositing your paychecks. This attack is most likely not noticed right away, but when you do notice, the effects can be very damaging. If the hacker changed some numbers on your spreadsheet, how do you know which ones are right and which ones are wrong?

The other type of destructive behavior attack is data destruction. This is when the attacker simply deletes your files. When this happens, it is very damaging, especially for a business. There is no way to recover the files and they are left with nothing. There are however ways to stay protected against hackers.

One thing a computer user can do is make make backups of your files. Simply put your files onto a blank CD or a floppy disk so they are safe even if a hacker were to tamper with or delete all your files. They may be able to attack your computer, but they can’t attack a CD, floppy disk, or any external memory device. This would keep your files safe in the event of an attack, or even if you were to have a hardware failure.

You should also be sure not to leave your files in the open. Save them in a place not so easily found by an attacker. This decreases the chance that a hacker will do something malicious to your important files. If they cannot find your important data, they cannot harm your important data. This is a simple thing that many computers do not do.

It is also important to avoid using systems with single points of failure, meaning if your computer has one flaw in its security, it is very vulnerable to attacks. Make sure that your security system can’t be broken through one component. If you give a hacker an inch, they will take it a mile. A minor attack could escalate and become a disaster.

You should make sure you update your system patches. Old bugs in the system can be exploited, and if you don’t stay up to date with the current fixes, attackers will exploit the old bugs. They cannot attack the fixes as easily. This is a very simple and easy thing to help protect yourself, yet if you don’t do this, it is a very simple and easy way for the attacker to break into your system.

Firewalls are another thing that can protect you from hackers. Connecting to the Internet provides two-way traffic, in and out of your computer. A firewall serves as a barrier and limits the traffic in and out of your computer. It can prevent a hacker from breaking into your system. Also, even if a hacker does break into your system, the firewall can prevent them from sending files from your computer. A firewall is a very important part to protecting your computer against attacks.

However, if you set your modem to answer incoming calls, an attacker can sneak around your firewall. This gives them another entry point into your computer. You must protect your modem, too. The terminal sever, which provides access to your network must be logged and checked for suspicious activity. It’s also important for you to have a good password; it shouldn’t be easily guessed. There are devices which create one time six to eight digit passwords, so a hacker would never be able to guess the right password because it’s ever changing.

Routers now have built in encryption between specific routers. This keeps them safe so an attacker could not break into your system. The information is encrypted so they could not read it out get into your console. This provides a secure route between computers.

Companies are also now using Virtual Private Networks. I uses the Internet to connect two different offices to each other. The only problem with this is that everyone on the network has access to everything, it isn’t possible to provide specific information to one computer on the network. Hackers cannot break into a Virtual Private Network because the link is encrypted.

There are numerous risks to computing and it is very important to be prepared for them. You have to watch out for hackers that can mimic your IP address, read your files, tamper with your files, and even delete your files. These risks are real, but if you are prepared you can safely utilize the Internet. Make sure you backup your files, keep your system updated, and have a firewall among other things to keep your computer safe. If you take all the necessary precautions, you will be at low risk to an attack, and you should be able to fully enjoy the Internet without the fear attackers.

Bibliography

http://www.cerias.purdue.edu/education/k-12/cerias_resources/files/infosec_newsletters/07cyberethics.php

http://ethics.csc.ncsu.edu/

http://www.interhack.net/pubs/network-security/network-security.html

Me

circa 2013 (25 y/o)

Popularly…

  • 04 Mar 25: Creon as a Tragic Character in “Antigone” #10th Grade – English – Forms of Fiction #Great Valley High School #Mr. Thomas Esterly
  • 06 Sep 25: Determining the Density of an Unknown Substance (Lab Report) #CHM 1112 (General Chemistry Lab I) #Dr. Joseph N. Bartlett #Saint Joseph’s University
  • 07 Sep 26: Recrystallization and Melting Point Determination Lab #CHM 2312 (Organic Chemistry Lab I) #Dr. Roger K. Murray #Saint Joseph’s University
  • 07 Oct 17: Acid/Base Extraction of a Benzoic Acid, 4-Nitroaniline, and Naphthalene Mixture #CHM 2312 (Organic Chemistry Lab I) #Dr. Roger K. Murray #Saint Joseph’s University
  • 09 Oct 2: Verifying Newton’s Second Law #Dr. Paul J. Angiolillo #PHY 1032 (General Physics Lab I) #Saint Joseph’s University
  • 05 Mar 28: The American Dream Essay #11th Grade – English – American Literature #Great Valley High School #Mrs. Michelle Leininger
  • 04 Nov 27: The Crucible Essay on the Theme of Having a Good Name #11th Grade – English – American Literature #Great Valley High School #Mrs. Michelle Leininger
  • 10 Mar 2: Electrical Resistance and Ohm’s Law #Dr. Paul J. Angiolillo #PHY 1042 (General Physics Lab II) #Saint Joseph’s University
  • 08 Apr 6: The Portrayal of Obsessive-Compulsive Disorder in “As Good as It Gets” #PSY 1151 (Psychology of Abnormal Behavior) #Saint Joseph’s University
  • 07 Nov 7: Liquids #CHM 2312 (Organic Chemistry Lab I) #Dr. Roger K. Murray #Saint Joseph’s University
  • 06 Oct 2: Yeast Lab #BIO 1011 (Biology I: Cells) #Dr. Denise Marie Ratterman #Saint Joseph’s University
  • 07 Nov 14: Thin-Layer Chromatography #CHM 2312 (Organic Chemistry Lab I) #Dr. Roger K. Murray #Saint Joseph’s University
  • 07 Feb 21: Determining an Equilibrium Constant Using Spectrophotometry #CHM 1122 (General Chemistry Lab II) #Mr. John Longo #Saint Joseph’s University
  • 06 Nov 20: The Effect Light Intensity Has on the Photosynthesis of Spinach Chloroplasts #BIO 1011 (Biology I: Cells) #Dr. Denise Marie Ratterman #Saint Joseph’s University
  • 04 Oct 3: Catcher in the Rye Essay on the Immaturity of Holden Caufield #11th Grade – English – American Literature #Great Valley High School #Mrs. Michelle Leininger
  • 06 Nov 14: Enthalpy of Hydration Between MgSO4 and MgSO4 ∙ 7 H2O #CHM 1112 (General Chemistry Lab I) #Dr. Joseph N. Bartlett #Saint Joseph’s University
  • 10 Mar 22: Series and Parallel Circuits Lab #Dr. Paul J. Angiolillo #PHY 1042 (General Physics Lab II) #Saint Joseph’s University
  • 07 Feb 14: Determining the Rate Law for the Crystal Violet-Hydroxide Ion Reaction #CHM 1122 (General Chemistry Lab II) #Mr. John Longo #Saint Joseph’s University
  • 10 Feb 22: Hooke’s Law and Simple Harmonic Motion #Dr. Paul J. Angiolillo #PHY 1042 (General Physics Lab II) #Saint Joseph’s University
  • 07 Feb 7: The Reactivity of Magnesium Metal with Hydrochloric Acid #CHM 1122 (General Chemistry Lab II) #Mr. John Longo #Saint Joseph’s University

More from…
Dr. Paul Burgmayer (Teacher) / Great Valley High School (School) / schoolwork (Post Type)

My Math Autobiography

↘︎ Aug 29, 2005 … 3′ … download⇠ | skip ⇢

I realized I liked math when I was in 2nd grade. My teacher gave our class a sheet of 100 addition and subtraction problems to do in five minutes. She told us to do as many as we could. I finished the whole sheet with a couple minutes left to spare and I even had time to check over all of the problems. I got every single problem right, and I was really proud of that. From then on I knew I was good at math and it was probably my favorite subject. In elementary school I could figure out the answers to math problems a lot quicker than anyone else. The teacher stopped calling on me because I answered too many questions. I had fun trying to solve problems as quickly as I could.

In 5th grade, we took the Math Olympiads. I did very well on them the whole year, and I was one of the three finalists in my school. The three of us took one last Math Olympiad, and whoever did the best would be the winner. I did the best and won the Math Olympiad contest! I was really proud and I got a trophy for winning.

In 6th grade I was in the high math class, and I realized that there were a lot of people better at math than me. My elementary school, Sugartown, didn’t have many people in the class, it comprised mostly of kids from K.D. Markley and Charlestown. I was slightly discouraged because of that, and also because of the new concepts we learned. I was confused at first, but eventually I started to do really well again.

In 7th and 8th grade we did the same subjects in math class and I did pretty well. Word problems gave me the most trouble, I wasn’t very good at setting them up and telling the difference between the different types of word problems. Everything else was very easy for me. I wanted to do better on word problems however because they serve the most real life application.

In 9th grade geometry was very easy for me. I found that proving something about two shapes was very easy. They were almost like word problems, but for some reason I understood them a lot better. I think it was because there was a picture always drawn out for you, so it was easy for me to visualize. Geometry was pretty fun for me.

In 10th grade math became harder, but I still did well. The pre-calculus section and the word problems were the hardest things for me. They baffled me most of the time, though everything else was once again easy for me. I am just not that great at solving word problems. The calculus part was hard for me to grasp at first, I didn’t know what it all meant and how you could apply it to real life.

In 11th grade BC Calculus was very hard for me at first. I struggled with all of the homework and only pulled B’s on the quizzes and tests. There were a lot of word problems and that was a problem for me. Calculus seemed to be almost all word problems after you learned the basic concept in the section. I worked hard during the year and I eventually started to better. Each marking period my grade went up. Around the time of the AP test, we took a practice test to see how we were doing. I did pretty badly, only getting a two on the practice test. The weekend before the test, I reviewed all of the practice material we had for hours. I really wanted to made sure I got a three. All I wanted was to get a three and pass. I took the test and I thought it was really hard, I thought if I would be really lucky I could get a three. In the summer when I got my results in the mail, I read my results and somehow I got a five! I couldn’t believe it, I thought they gave me someone else’s score. I understood calculus better than I thought I did.

I use math when I play poker. When you play, it’s very important to count how many “outs” you have, or cards left in the deck that would give you the winning hand. You have to compare the size of the pot to how many odds you have left to figure out whether you should fold, check, call, bet, or raise. I’m trying to get faster at calculating all of that stuff; I am still a little slow. It can become tricky calculating everything because you have to keep in mind that some cards that you consider outs can really give your opponent a better hand. I think it is fun to calculate the numbers to give yourself the best chance of winning in the long run.

I keep track of data when I do football picks every week. I try to look for trends to figure out which team will win. I look back at previous season and the current seasons and look at how teams did at home and away, against teams with similar records, how the team did against the line, and that sort of stuff. I kept track of a lot of statistics last year to aid with my picks. I enjoy math for the most part and I try to apply it to my everyday life.

Me

circa 2009 (21 y/o)

Randomly…

  • 06 Sep 26: Determining the Formula of an Ionic Hydrate Gravimetrically #CHM 1112 (General Chemistry Lab I) #Dr. Joseph N. Bartlett #Saint Joseph’s University
  • 08 Nov 17: Challenges Facing Newly Founded Democracies #Dr. Kazuya Fukuoka #POL 1031 (Introduction to Comparative Politics) #Saint Joseph’s University
  • 06 Feb 7: Me Speaking French #2 #12th Grade – AP French #Great Valley High School #Mrs. Patricia Carlini
  • 10 Feb 22: Hooke’s Law and Simple Harmonic Motion #Dr. Paul J. Angiolillo #PHY 1042 (General Physics Lab II) #Saint Joseph’s University
  • 05 Nov 17: DBQ on Slavery in France #10th Grade – History – Modern World History #Great Valley High School #Mr. Bill Mayberry
  • 04 Sep 29: Plant Dispersion Lab #11th Grade – Science – Biology 2 #Great Valley High School #Ms. Nicole Jones
  • 04 Mar 25: Creon as a Tragic Character in “Antigone” #10th Grade – English – Forms of Fiction #Great Valley High School #Mr. Thomas Esterly
  • 02 Feb 27: Margarine is to Butter as Adam is to Jem #8th Grade – English #Great Valley Middle School #Mrs. Heidi Capetola
  • 07 Apr 26: Beak of the Finch Response Questions #BIO 2281 (Biology Seminar) #Dr. Michael P. McCann #Saint Joseph’s University
  • 98 Apr 13: The Birthday Cake Surprise #4th Grade #Ms. Ringle #Sugartown Elementary School
  • 10 Apr 18: Law of Reflection Lab #Dr. Paul J. Angiolillo #PHY 1042 (General Physics Lab II) #Saint Joseph’s University
  • 10 Apr 20: The Mental, Physical, and Social Implications of Self Enhancement #Dr. Judith J. Chapman #PSY 2341 (Psychology of the Self) #Saint Joseph’s University
  • 06 Nov 20: The Effect Light Intensity Has on the Photosynthesis of Spinach Chloroplasts #BIO 1011 (Biology I: Cells) #Dr. Denise Marie Ratterman #Saint Joseph’s University
  • 06 Sep 18: Egg Lab Results #BIO 1011 (Biology I: Cells) #Dr. Denise Marie Ratterman #Saint Joseph’s University
  • 06 May 1: Le Québec #12th Grade – AP French #Great Valley High School #Mrs. Patricia Carlini
  • 07 Jan 31: Determination of the Bleach Strength of a Commercial Bleach Solution #CHM 1122 (General Chemistry Lab II) #Mr. John Longo #Saint Joseph’s University
  • 05 Oct 16: Villanova #Great Valley High School
  • 97 Sep 28: The Witch’s Curse #4th Grade #Ms. Ringle #Sugartown Elementary School
  • 06 Oct 22: Enzyme Kinetics Lab #BIO 1011 (Biology I: Cells) #Dr. Denise Marie Ratterman #Saint Joseph’s University
  • 08 Dec 9: Using a Parr Bomb to Measure Enthalpy #CHM 2412 (Physical Chemistry Lab I) #Dr. Jose Cerda #Saint Joseph’s University

More from…
Dr. Paul Burgmayer (Teacher) / Great Valley High School (School) / schoolwork (Post Type)

  • Home
  • About
  • Archive
  • Mail
  • Random
  • Dingus
  • Reading
  • Code

ADAM CAP is an elastic waistband enthusiast, hammock admirer, and rare dingus collector hailing from Berwyn, Pennsylvania.

My main interests at this time include reading, walking, and learning how to do everything faster.

Psst: If you find my website helpful or enjoyable, please join my newsletter and/or send me an email—I want to hear from you!

Disclosure: As an Amazon Associate I earn from qualifying purchases.

© 2009–2023 Adam Cap(riola) top ⇡