Tag: classes
Java Tutorial – 11 – Class
A class is a template used to create objects. They are made up of members, the main two of which are fields and methods. Fields are variables that hold the state of the object while the methods define what the object can do. The class can also have a constructor. This is a special kind…
Analysis of Merge sort algorithm
In our previous lesson, we had explained merge sort algorithm. Now, in this lesson we are going to analyze merge sort algorithm. We will look at various properties of merge sort algorithm. We will try to see how efficient it is terms of time and space complexity. Some of the properties of merge sort algorithm…
Moving from PHP (or any other programming language) to Javascript
– So, we’re here at Prismic Studio. We did a video, previous to this one where we talked with Sarah from Algolia. We talked about your journey to become a programmer. It started with CSS. You went to journalism, you came back to do some Flash and suddenly it’s PHP, you started doing PHP and…
Picture Traversal – Intro to Java Programming
Now you’ve done this already, remember? When you changed all of the pixels from an image into the negative. At the time, I gave you the loop structure to do this, and I told you not to look too closely at it. Now, we’re ready to reveal this mystery. On your left we’re going to…
Lec 12 | MIT 6.00 Introduction to Computer Science and Programming, Fall 2008
The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high quality educational resources for free. To make a donation or view additional materials from hundreds of MIT courses, visit MIT OpenCourseWare at ocw.mit.edu. PROFESSOR: I want to take a few minutes at the start of…
Drive – Intro to Java Programming
Here is the drive method. We increment the location and now we want to remove all passengers who wanted to get to that location. That turns out to be a bit tricky so I’ll want to find the passenger and then remove it. To remove a passenger I need to know the index. So I…
Lec 16 | MIT 6.00 Introduction to Computer Science and Programming, Fall 2008
OPERATOR: The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high quality educational resources for free. To make a donation or view additional materials from hundreds of MIT courses, visit MIT OpenCourseWare at ocw.mit.edu. PROFESSOR: Last lecture we were talking about classes, and object-oriented programming,…
Calculating Circular Fields – Intro to Java Programming
A farmer has irrigation systems that work for circular fields. He wants to lay out the fields, so that he wastes as little land as possible and wastes no water at all. So, the fields can’t overlap and there can’t be factional fields because then he will be watering somebody else’s lands. He is looking…
Lec 15 | MIT 6.00 Introduction to Computer Science and Programming, Fall 2008
OPERATOR: The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high quality educational resources for free, To make a donation or view additional materials from hundreds of MIT courses, visit MIT OpenCourseWare at ocw.mit.edu. PROFESSOR: Last time, Professor Guttag introduced the idea of objects and…