04-02 Discover Blog

Formulate the Problem

  • What is the problem/task you need to solve in this project?

The problem/task we need to solve in this project, is to be able to construct a computer model using conservations of momentum to represent the motion of 2 objects before and after a collision.

    • What are the most important “knows” about this project?

I think the most important knows about this project is that we will conduct two labs to discover the equation for momentum and verify that momentum is conserved in various forms of collisions. we will complete problem sets in class to practice using conservation of momentum. We will choose one of these problems to model and use that problem to define the variables in our code. We will create a storyboard to outline our model. In our code, we will first create your objects and display their initial values. Then, we will learn ow to use if () else () statements to determine when the collision occurs and the motion after the collision. We will test our computer models to see if it detects the collision and compare the velocity after the collision with the solution you calculated in the problem set. We will finally submit our final, and revised collision model in our last blog post.

    • What are the important “need-to-Knows”?

I think some of the important need to knows is are we limited to a certain amount of objects in the model? How do you calculated conservation of momentum?

    • What are your next steps for solving this task?

I think some of the next steps for solving this task is to plan out how we’re going to make the computer model by creating a storyboard, and to learn more about calculating conservation of momentum. We also have to conduct the two labs, and to create the actual program.

Awareness of Constraints

  • What are the constraints (limitations/requirements) of the collision model? (such as time, design specs, etc)

The constraints (limitations/requirements) of the collision model is the time that we will have to create the model. Also I think the creation of the storyboard might be a bit of a constraint since I don’t really plan too far ahead when coding, but instead rather do it as I go, and debug when exceptions show up.

Advertisements

Occasionally, some of your visitors may see an advertisement here

Organizing a Human Computer Reflection Blog Post

What did you learn about computers from this project ?

Throughout lesson 1, I learned that computers are very complex and contain many vital parts just like the human body. When we were organizing human body parts with computer parts, there was a correlation between human body parts and computer parts. For example, the heart was like the hard drive, the speakers were the mouth and the brain was the operating system.

How do you now think computers work ?

Computers work by combining parts and matching each other to create certain functions such as producing music, photoshop and whatever you want to do. These different parts send information to each other in the form of binary code, and small voltages of electricity. It’s similar to the human body since everything must work together and combine to live, play and work. Also, the human body also uses electricity to send information to different neurons.

CSC Course – 2/4/17

Professor: Ayman Zeidan

Email: Ayman.cuny@gmail.com

Chapters 1-6

Exam 1: covers chapters 1-2

Exam 2: covers chapters 3-4

Final: covers chapters 1-6

 

Java History

-1991, Green Team started by Sun Microsystems

-*7 handheld controller for multiple entertainment systems.

-There was a need for a programming language that would run on various devices.

-Java (first named Oak) was developed for this purpose.

Introduction

-Java enabled web browser (HotJava) Demonstrated at 1995 Sun World Conference.

-Java incorporated into Netscape shortly after.

-Java is “cross-platform”, meaning that it can run on multiple systems.

Java applications and applets

-Java programs can be of two types:

-Applications: Stand-alone programs that run without the aid of a web browser. Had a relaxed security model since the user runs the program locally.

-Applets: Small applications that require the use of a Java enabled web browser to run. Had a enhanced security model since the user merely goes to a web page and the applet runs itself.

Why program?

-Computers are tools that can be programmed to perform many features such as:

  • Spreadsheets
  • Databases
  • Word processing
  • Games
  • Etc.

-Computers are versatile because they can be programmed.

-Computer programmers implement programs that perform these functions.

-Aspects of a computer program that must be designed:

  • The logical flow of the instructions.
  • Programs must be analytically correct as well.
  • Programs rarely work the first time they are programmed.
  • Programmers must perform the following on a continual basis:
    • Analyze
    • Experiment
    • Correct and Redesign
  • Programming languages have strict rules, known as syntax, that must be carefully followed.

Computer Systems:Hardware

-Computer hardware components are the physical pieces of the computer.

-The major hardware components of a computer are:

  • The central processing unit (CPU)
  • Main memory
  • Secondary storage device
  • Input and output devices

Central processing unit

-Arithmetic logic unit

-Control unit

-The CPU performs the fetch, decode, execute cycle in order to process program information.

-The CPU’s control unit fetches from the main memory, the next instruction in the sequence of program instruction.

-The instruction is encoded in the form of a number. The control unit decodes the instructions and generates an electrical signal.

-The signal is routed to the appropriate component of the computer. The signal causes the component to perform an operation.

Computer systems:Hardware:Main memory

-Commonly known as random-access memory (RAM).

-RAM contains:

  • Currently running programs
  • Data used by those programs.

-RAM is divided into unites called bytes.

-A byte consists of eight bits that may be either on or off.

1 bit = 0 or 1

1 byte = 8 bits

1 KB = 1000 bytes = 8000 bits

1 MB = 1,000,000 bytes

1 GB = 1,000,000,000 bytes

1 TB = 1,000,000,000,000 bytes

and so on

-A bit is either on or off.

  • 1 = on
  • 0 = off

-The bits form a patter that represents a character or a number.

-Each byte in memory is assigned a unique number known as an address.

-RAM is volatile, which means that when the computer is turned off, the contents of the RAM is erased.

-Main memory can be visualized as a row or column of cells.

  • A section of memory is called a byte.
  • A byte is made of 8 bits.
  • A section of two or four bytes is often called a word.

Computer systems:Hardware:Secondary storage

-Secondary storage devices are capable of storing information for longer periods of time (non-volatile).

-Common secondary storage devices:

  • Disk drive
  • External drive
  • CD Drive
  • Solid-State Drive
  • USB Drive
  • DVD Drive

Computer systems:Hardware:Input devices

-Input is any data the computer collects from the outside world.

-That data comes from devices known as input devices.

-Common input devices:

  • Keyboard
  • Mice
  • Scanners
  • Digital Camera

Computer systems:Hardware:Output devices

-Output is any data the computer sends to the outside world.

-That data is displaced on devices known as output devices.

-Common output devices:

  • Monitors
  • Printers

-Some devices such as disk drives perform input and output functions are called I/O devices.

Computer systems:Software

-Software refers to the programs that run on a computer.

-There are two classifications of software:

  • Operating system
  • Application software

Computer systems:Software:Operating systems

-An operating system is a set of programs that manages the computer’s hardware devices and controls their processes.

-Most all modern operating systems are multitasking.

-A multitasking operating system is capable of running multiple programs at once.

  • Unix
  • Linux
  • Mac OS
  • Windows

-The technique is called time sharing.

-A multitasking system divides the allocation of hardware resources and the attention of the CPU among all the executing programs.

Computer systems:Software:Application software

-Application software refers to programs that make the computer useful to the user.

-Application software provides a more specialized type of environment for the user to work in.

Programming Languages

-A program is a set of instructions a computer follows in order to perform a task.

-A programming language is a special language used to write computer programs.

-A computer program is a set of instructions that enables the computer to solve a problem or perform a task.

-Collectively, these instructions form a algorithm.

-An algorithm is a set of well defined steps to completing a task.

-The steps in a algorithm are performed sequentially.

-A computer needs the algorithm to be written in machine language.

-Machine language is written using binary numbers.

-The binary numbering system (base 2) only has two digits (0 and 1).

-The binary numbers are encoded as a machine language.

-Each CPU has its own machine language.

  • Motorola 6800 series processors
  • Intel x86 series processors
  • ARM processors
  • Etc.

-Example of a machine language instruction: 1011010000000101.

-In the distinct past, programmers wrote programs in machine language.

-Programmers developed higher level programming languages to make things easier.

-The first of these was assembler.

-Assembler made things easier but was also processor dependent.

-High level programming languages followed that were not processor dependent.

-Some common programming languages:

  • Java
  • BASIC
  • COBOL
  • Pascal
  • C
  • C++
  • C#
  • PHP
  • Visual Balance
  • Python
  • Ruby
  • JavaScript

Programming languages:Common language elements

-There are some concepts that are common to virtually all programming languages.

Programming languages:Sample program

public class Hello World

{

public static void main (string [] args)

{

String message = “Hello World”;

system.out.println (message);

}

}

-Keywords in the sample program are:

  • public
  • class
  • static
  • void

-Keywords are lowercase (Java is a case sensitive language).

-Keywords cannot be used as a programmer defined identifier.

-A semi-colon are used to end Java statements; however, not all lines of a Java program end a statement.

-Part of learning Java is to learn where to properly use the punctuation.

Programming languages:Lines V.S. statements

-There are differences between  lines and statements when discussing source code.

system.out.println (

message);

-This is one Java statement written using two lines. Do you see the difference?

-A statement is a complete Java instruction that causes the computer to do something.

Programming languages:Variables

-Data in a Java program is stored in memory.

-Variable names represent a location in memory.

-Variables in Java are sometimes called fields.

-Variables are created by the programmer who assigns it a programmer-defined identifier.

Example: int hours = 40;

-In this example, the variable, hours, is created as an integer (more on this later) and assigned the value of 40.

-Variables are simply a name given to represent a place in memory.

-Assume that this variable declaration has been made.

int length = 72;

-The variable, length, is a symbolic name given for the memory location.

-The Java Virtual Machine (JVM) actually decides where the variable is located in memory.

The Compiler and The Java Virtual Machine

-A programmer writes Java programming statements for a program.

-These statements are known as a source code.

-A text editor is used to edit and save a Java source code file.

-Source code files have a .Java file extension.

-A compiler is a program that translates source code into a executable form.

-A compiler is run using source code file as a input.

-Syntax errors that may be in the program will be discovered during the compilation.

-Syntax errors are mistakes that the programmer has made that violate the rules of the programming language.

-The compiler creates another file that holds the translated instructions.

-Most compilers translate source code into executable files containing machine code.

-The Java compiler translate a Java source file into a file that contains byte code instructions.

-Byte code instructions are the machine language of the Java Virtual Machine (JVM) and cannot be directly executed directly by the CPU.

-Byte code files end with the .class file extension.

-The JVM is a program the emulates a micro-processor.

-The JVM executes instructions as they are reading.

-The JVM is often called an interpreter.

-Java is often referred to as an interpreted language.

Program Development Process

-Text Editor saves Java statements and results in a source code ending with  a .Java file extension.

-The source code is then read by the Java compiler.

-The Java compiler compiles it to Byte code which ends with a .class file extension.

-The byte code is then translated by the JVM.

-The JVM translated code results in a program execution.

Portability

-Portable means that a program may be written on one type of computer and then run on a wide variety of computers, with little or no modifications.

-Java byte code runs on the JVM and not on any particular CPU; therefore, compiled Java programs are highly portable.

Compiling a Java Program

-The Java compiler is a command line utility.

-The command to compile a program is: javac filename.java

-javac is the Java compiler.

-If there are no syntax errors, the compiler will translate it to byte code.

The Programming Process

  • Clearly define what the program is to do.
  • Visualize the program running on the computer
  • Use design tools to create a model of the program.
  • Check the model for logical errors.
  • Enter the code and compile it.
  • Correct any errors found during the compilation.
  • Run the program with test data for input.
  • Correct any run-time errors.
  • Validate the results of the program.

Software Engineering

-Encompasses the whole process of crafting computer software.

-Software engineers perform several tasks in the development of complex software projects.

-Software engineers develop:

  • Program specifications
  • Diagrams of screen outputs
  • Diagrams representing the programming components
  • Pseudcode
  • Examples of expected input and desired amounts
  • special software designed for testing programs

-Software engineers also use special software designed for testing programs.

-Most commercial software applications are large and complex.

-Usually a team of programmers, not a single individual develops them.

-Program requirements are thoroughly analyzed and divided into subtasks that are handled by:

  • Individual teams
  • Individuals within a team

Procedural Programming

-Older programming languages was procedural.

-A procedure is a set of programming language statements that, together, perform a specific task.

-Procedures typically operate on data items that are separate from the procedures.

-In a procedural program, the data items are commonly passed from one procedure to another.

-In procedural programming, procedures are developed to operate on the programs data.

-Data in the program tends to be global to the entire program.

-Data formats might change and thus, the procedures that operate on that data must change.

Object Oriented Programming

-Object oriented programming is centered on creating objects rather than procedures.

-Objects are a melding of data and procedures that manipulate that data.

-Data in an object are known as attributes.

-Procedures in an object are known as methods.

-Objected oriented programming combines data and behavior via encapsulation.

-Data hiding is the ability of an object to hide data from other objects in the program.

-Only an object method should be able to directly manipulate these attributes.

02-02 Road to Revolution

Treaty of Paris (1763)

-Britain gave land west of the Appalachian Mountains to Natives to prevent future wars.

-Did not want to pay for troops to protect the colonies.

-Wanted Colonists to pay for the costs of fighting the Natives.

Results of the French and Indian War

-Proclamation of 1763 limited the Colonists to the area east of the Appalachian Mountains.

-Britain was in debt and wanted the Colonists to pay the cost of the war.

Sugar Act (1764)

-The British passed the sugar act to make up money lost in the war.

-Tax on sugar and molasses.

-Rum manufacturing declines and the Colonists make less money.

Stamp Act (1765)

-Tax on all printed materials to pay for British Troops in North America.

-Stamp Act Congress met to protest the tax.

-The Stamp Act Congress led directly to the Declaration of Independence.

Townshend Acts (1765)

-Tax on many imports including tea.

-Colonial protests led to it’s repeal; except for the tea tax.

-Tea tax raised prices on non-British tea.

Boston Tea Party (1773)

-In response to Tea Act, Colonists dumped around 90,000 pounds of British tea into Boston Harbor.

-The tea was worth more than 1 million dollars in today’s money.

Intolerable Acts (1774)

-Following the British Tea Party, Boston Harbor is closed until the British are paid back for the tea.

-The Quartering Act was the most hated.

Boston Massacre (1770)

-What starts as a snowball fight turns into a violent colonial protest.

-British Soldiers fire on protesters and killed 5.

Representation, The Big Issue!

-Colonists objected to being taxed without representation in Parliament (British government).

-They were not consulted about taxes.

-Colonists wanted to have their voiced heard by the king.

02-01 The French and Indian War

Conflict in North America

-In the mid- 1700s, Great Britain and France had competing claims for land in North America.

-The French held fur trapping and trade routes in the Ohio River Valley.

-The British Colonies were intruding on French territory as the population grew larger.

-The war will be fought over land!

Events Leading To The French and Indian War

-France set up forts to protect their fur trading interests. Some of these forts intruded on British claims.

-Virginia governor sent a young George Washington to deliver a protest to the french. He and the protest are ignored.

-Washington is ordered to march to the mouth of the Ohio River and build a fort to control the rivers.

-Washington is driven off and the French build Fort Duquesne. The war has officially begun.

The People Involved

The Natives align with the French because the French were a good supplier of guns.

The Colonists align themselves with the British because they would benefit from it, and could possibly gain more land to help with population influctuations.

French and Indian War (1754-1763)

-Early British operations failed and the French still had control of the Ohio River valley and Fort Duquese.

-By 1760 however, Great Britain had successfully taken several key forts in Canada.

Aftermath of The French and Indian War

-The French end up as the losers and surrender their land claims (including Canada).

-Treaty of Paris (1763) is signed to make the land transfer official.

-Britain also make an agreement with the Natives; the Proclamation Line of 1763. (It states that Colonists will not settle west of the Appalachian Mountains.)

-Because of this, Great Britain has huge war debts and the Colonists feel united, but also slightly cheated since they didn’t gain any land for helping the British in the war.

How do computers affect your future?

Computer technology affects lives positively by enhancing communication, facilitating access to information and revolutionizing business activities. It also promotes learning and the process of building professional relationships through networking. However, computer technology can make people lazy, according to The Telegraph. It also limits social interaction. Computer technology affects people’s lives because they spend a lot of time with computing devices and resources, such as mobile phones and the Internet. People depend on computers in doing almost everything, including purchasing goods, making bookings, inquiring about family and friends, and making decisions. In addition, computer technology allows people to overcome barriers, such as distance, in education and work activities. According to HowStuffWorks, computer technology blurs the line between private and professional lives. Computer technology allows storage of a lot of information and simultaneous retrieval of data. It also eases the manipulation of data, such as photos and sound. However, The Telegraph argues that people are less likely to remember what they see or read on computers. In addition, computer technology can be distracting, and it may create distance among family members. Computers stream several pieces of information, causing people to skim or scan through them, instead of thorough and reflective reading. According to The Telegraph, the media images that children view through computer technology, such as violence on online media, has negative effects on their social and psychological processes.

Egg Car Project 03-03 Exploring Axles and Wheels

One strategy Naela and I tried to use to make wheels that roll were to put a straightened paperclip through a straw, then put a lifesaver mint on each end of the paperclip. We then bent each end of the paperclip upwards so that the lifesaver would not fall off the paperclip. We then use a piece of blue painter’s tape to tape the axle and wheel We came up with this idea after reading AHC Arts and Craft’s article about making wheels and axles. This idea had a few issues though. One issue was that the wheels wouldn’t actually turn properly. This issue was due to the fact that there was space between the piece of cardboard and the lifesaver mint. This issue could have been prevented by crumpling up a piece of blue painter’s tape, and pushing it onto the paperclip directly next to the lifesaver min, so that it could prevent the lifesaver from falling onto its side. A second issue with this strategy was that occasionally, the lifesaver would still fall off the paperclip despite the fact that we bent the end so it would prevent it from falling off. (LOL fail!) This issue could have been prevented by taking a piece of blue painter’s tape, and taping the bent edge of the paperclip to the lifesaver mint itself; make sure that the piece of painter’s tape cover the entire hole in the lifesaver mint. This prevented the lifesaver mint from falling off the paperclip since it taped the paperclip to the wheel itself. The third and final issue we encountered with this strategy, was that the wheels, the lifesaver mints, were really fragile. This issue could be prevented by making sure your wheel doesn’t crash or hit anything hard. Naela and I fixed the wheel by taking two pieces of blue painter’s tape, and taped the wheel back together. (Improvise!) A second strategy Naela and I tried, was to put a straightened paperclip through a straw, then put a gum ball on each end of the paperclip. This strategy worked better than the one with the lifesaver mint, since the gum ball actually stayed in place, unlike the lifesaver mint, which moved around a lot. We got the idea after making the same axle with lifesaver mints, which didn’t work that well, and wondered what would happen if we replaced the lifesaver mints with gum balls. However, this axle had its own problem. It was hard to put the paperclip right in the center of the gum ball, so the axle would always go off to one side, instead of going straight. This issue could be prevented by putting the paperclip exactly in the center of the gum balls, which is extremely difficult.

For my car prototype, I think I’m going to use:

-two straws

– 2 wooden dowels

-2 wooden wheels

-2×4

-popsicle sticks

-hot glue gun

-hot glue

-screws

-screwdriver

-neodymium magnets

-small cloth pouch (big enough to hold egg in it)

Egg Car Project – Discover

Egg Car Project – Formulate The Problem

The task I need to solve in the egg car project is to design and create a car that could carry an egg down a steep ramp, hit a wall, and still keep the egg intact.

In my opinion, I think the most important “knows” about this project is that the car with the egg inside, will go down a steep ramp, hit a wall, and still keep the egg. Also that there are 3 checkpoints in the project, the first checkpoint is on January 17, where the car needs to be able to roll, the second checkpoint is on January 31, where we need to increase the net force of our car, meaning that we need to make our car accelerate faster, the third and final checkpoint, is on February 15, where we need to reduce the collision force, which means that we need to protect your egg. Also, the car needs to have at least 2 safety features built-in, and has to have an easily accessible “seat” for the egg. Finally, the car can’t be more than 15 centimeters on any side.

One important “need-to-knows” is how high/how steep the ramp is. Also another important “need-to-know” is whether there are material restrictions. I would also like to know whether there is a minimum amount of posts we need to publish, or if it’s up to us. Finally, are there going to be a weight and material restriction?

One next steps for solving this task is to ask Ben some of the questions I have. I could also start to come up with design ideas I have for the car, and begin to think about possible materials that I might use. During class lessons I could pay attention, and ask for help when I need help.

Egg Car Project – Awareness Of Constraints

One constraint of the egg car project is time. Our car needs to be able to roll by January 17. The cars acceleration would need to be increased by January 31. Finally, the collision force of the car must be reduced by February 15. Another constraint of the egg car project is the dimensions of the car. The car can’t be more than 15 centimeters long on any side.