IB CS HL yr1 2019
- Frankfurt International School - Dave_Mulkey@fis.edu - 2017-18
[[ %"background:#ddeeff" Links: \
Lewis+Loftus-Java
``\
Java Tutorial
``\
Basic Java Lessons
``\
Internal Assessment Java Notes
Comp Sci Illuminated Book
``\
Vocabulary
``\
CS Dictionary
``\
How Stuff Works
``
IB CS Course Guide
``\
Pseudocode
``\
Notes and Review Page 2018
``\
Java Algorithm Practice
Visual Algs
% ]] [[ %"background:pink" % ]] ###Emergency Communication Videos - 18-19 June 2018 \ Today's assignment: Find a STORY (e.g. news story) about EMERGENCY COMMUNICATION SYSTEMS during a REAL EMERGENCY (not a fantasy, but a real story). Here are some videos you could watch, or find your own story. We will discuss your stories tomorrow - be prepared to briefly explain what you found out. Emergency Connectivy Failures in Puerto Rico ~https://www.youtube.com/watch?v=G_oDVNSiycE~ Will your Smartphone work during a hurricane? ~https://www.youtube.com/watch?v=E7nScMyLLe4~ Google Balloons ~https://www.youtube.com/watch?v=OFGW2sZsUiQ~ An Emergency Communication Center ~https://www.youtube.com/watch?v=1aEY3UR1KuI~ Joplin Tornado ~https://www.youtube.com/watch?v=kFJaNuR-MB4~ Emergency Bug Out Bag ~https://www.youtube.com/watch?v=Rt6dg4-ZJEY~ Tsunami Communications ACEH ~https://www.youtube.com/watch?v=EtznR_u6TQ8~ ###Importance of Persistence (storage) - 15 June 2018 \ Here is an example Stage A (plus Stage B) from the previous syllabus - it has some good ideas: ~http://ibcomp.fis.edu/projects/onlinegrades/analysis.pdf~ ###Starting on Stage A - 14 June 2018 \
Read p.4-7 in these notes (don't worry about details - these are notes from the old syllabus): ~http://ibcomp.fis.edu/275979/ibcomp/projects2014/DossierOverviewE.pdf~ To see what is expected, look at these two examples (the Stage A part): Example 8 Computer Science for Kids in Java ~https://ibpublishing.ibo.org/live-exist/rest/app/tsm.xql?doc=d_4_comsc_tsm_1201_2_e&part=4&chapter=15~ Example 6 Stock Control System ~https://ibpublishing.ibo.org/live-exist/rest/app/tsm.xql?doc=d_4_comsc_tsm_1201_2_e&part=4&chapter=13~ ###Vocabulary List - 12 June 2018 \ Here is the link to our Google Doc voabulary list: ~https://docs.google.com/document/d/1Bbx2EjV4JBxLWDeetIbkF3yVP2OOcFBeVLhOYQyCfHA/edit?ts=5b1f7750&pli=1~ ###Case Study for 2019 - 11 June 2018 \ Here is a link to the 2019 Case Study: ~https://drive.google.com/file/d/13UWQo-sVkdxaIE0gC0Sf65DBBXg0_l7c/view?usp=sharing~ We will discuss this today - you will also receive a paper copy, in case you wish to use it to take notes. Here are answers to the Final Exam: ~YearEnd2018/FinalExam2018answers.pdf~ ###Turning in your Functional Prototype - 25-28 May 2018 \ Your Functional Prototype is due on 30 May. The functional prototype is a simple, beginning version of your IA Program. It must be written in Java (NetBeans). It must contain: - buttons, textfields and/or lists for the basic functions - an ACTION STORY for each button, maybe more - it should FUNCTION at a basic level - it is not expected to be "complete", but the buttons should do something useful - this will be similar to your Visual Prototype, but this will actually do something To turn in this assignment, you must COMPRESS your project folder to a .zip archive, then upload the compressed .zip archive into Haiku. It will not do any good to simply upload a single .java file. ###Review for Final Exam - 23 May 2018 \ Summary of 2017-2018 Web-Site: ~2018FinalReview.pdf~ Here is the final exam from June 2016: ~http://ibcomp.fis.edu/275979/ibcomp/yearend2015/finalexam2016.pdf~ and here are the answers: ~http://ibcomp.fis.edu/275979/ibcomp/yearend2015/finalexam2016answers.pdf~ This is not identical to this year's exam, as we studied some different topics. But it is similar. Remember that your Functional Prototype is due on 30 May at 18:00. It's probably better to finish that before Final Exams start, so by 28 May. During class this week, you may work on any of the following: - review for the Computer Science Final exam - ask questions about things you don't remember from earlier this year - work on your Functional Prototype - review for other classes Solution for Pascal's Triangle: ~netbeans/Pascal.zip~ ###Pascal's Triangle - 22 May 2018 \ We will do some programming practice with calculations and 2-D arrays: ~netbeans/PascalsTriangle.pdf~ ###More ADTs - 17 May 2018 \ Topic 5 - Abstract Data Structures: ~https://docs.google.com/document/d/1Gx2eqAy1WuMlx7yjoK7R9RMyydpx6gNuYVmzytP_kq4/edit~ Travelling Salesman Problem: ~netbeans/TravellingSalesman.pdf~ Ideas for future discsussions about 2D Arrays: - Pythagorean Triples - Seating (planes, theaters) - Train Times - Pascal's Triangle - Spreadsheets ###More ADTs - 16 May 2018 \ Here is the correct project from yesterday: ~netbeans/ADTS.zip~ ''Today's Assignment'' Now create a project, using a GUI, that contains 2 lists of names. These names are for waiting lists for a doctor's office. You do NOT need to display the names - don't use a List box. There should be two buttons for EACH list (4 buttons altogether): [New Name] [Retrieve Next] One list is for normal patients. The second list is for emergency patients. The normal list must function as a queue. The emergency list functions as a stack. Your program should use the STACK and QUEUE classes from yesterday. The [New Name] button inputs a name and adds it to the corresponding list. The [Retrieve Next] button removes a name from the corresponding list and outputs that name, so the person can be called in to the office. Here is a good video about the current state of Robot development: ~https://edition.cnn.com/videos/cnnmoney/2018/05/11/atlas-spotmini-boston-dynamics-robots-run-navigate-cnnmoney-orig.cnnmoney/video/playlists/technology/~ ###Topic 5 - 15 May 2018 \ Topic 5 - Abstract Data Structures: ~https://docs.google.com/document/d/1Gx2eqAy1WuMlx7yjoK7R9RMyydpx6gNuYVmzytP_kq4/edit~ We will discuss how to program Stacks and Queues in Java. [[ public class Testing { Stack stack = new Stack(); Queue queue = new Queue(); public Testing() { testStack(); testQueue(); } public void testStack() { stack.push("aaa"); stack.push("bbb"); stack.push("ccc"); stack.push("ddd"); String item = stack.pop(); output(item); item = stack.pop(); output(item); item = stack.pop(); output(item); output("Is stack empty? " + stack.isEmpty()); } public void testQueue() { queue.enqueue("aaa"); queue.enqueue("bbb"); queue.enqueue("ccc"); queue.enqueue("ddd"); String item = queue.dequeue(); output(item); item = queue.dequeue(); output(item); item = queue.dequeue(); output(item); output("Is queue empty? " + queue.isEmpty()); } public static void main(String[] args) { new Testing(); } public void output(String message) { javax.swing.JOptionPane.showMessageDialog(null,message); } public String input(String prompt) { return javax.swing.JOptionPane.showInputDialog(null,prompt); } } ]] [[ import java.util.*; public class Stack { LinkedList
data = new LinkedList
(); public String pop() { String answer = data.removeFirst(); return answer; } public void push(String s) { data.addFirst(s); } public boolean isEmpty() { return data.isEmpty(); } } ]] [[ import java.util.*; public class Queue { LinkedList
data = new LinkedList
(); public String dequeue() { return "???"; } public void enqueue(String s) { } public boolean isEmpty() { } } ]] ###Mini Case Study - 14 May 2018 \ ''FIRST'' Discuss notes from last class. ''Second'' Why do we need REAL-TIME computer systems? Iron Man Flies : ~https://www.youtube.com/watch?v=PZlL5gZeGDI~ ~https://www.youtube.com/watch?v=ZwOxM0-byvc~ Future Tech - demonstrating REAL TIME control: ~https://www.youtube.com/watch?v=DeFFrHQxQVc~ Technical Details of the Fly Board ~https://www.youtube.com/watch?v=hvEl5S0w62E~ Development of an Alternative System ~https://www.youtube.com/watch?v=ADscM9VFxsA~ ###Stacks and Interrupts - 11 May 2018 \ Today we will discuss this article about Stacks and Interrupts: ~https://www.theregister.co.uk/2018/05/09/intel_amd_kernel_privilege_escalation_flaws/~ Here is an introduction to how Interrupts work at the HARDWARE level: ~https://www.youtube.com/watch?v=dqoOhPiKARs~ Here are some notes about Stacks and Queues: ~http://ibcomp.fis.edu/275979/ibcomp/review/oldReview/Reading/2-DataAccess.html~ Here is an article that explains the basics of interrupts: ~https://computer.howstuffworks.com/operating-system5.htm~ Here is a presentation that briefly explains the system STACK:
Stacks
We will be discussing Abstract Data Types (ADTS) for the next couple weeks. Here are the IB Syllabus notes: ~https://docs.google.com/document/d/1Gx2eqAy1WuMlx7yjoK7R9RMyydpx6gNuYVmzytP_kq4/edit?usp=sharing~ ###Sample Final Exam - 7 May 2018 \ Some students asked to see a sample final exam. Here is the final exam from June 2016: ~http://ibcomp.fis.edu/275979/ibcomp/yearend2015/finalexam2016.pdf~ and here are the answers: ~http://ibcomp.fis.edu/275979/ibcomp/yearend2015/finalexam2016answers.pdf~ This is not identical to this year's exam, as we studied some different topics. But it is similar. ###Starting Activity Stories and Functional Prototype - 4-9 May 2018 \ HOW-TOs: Automatically Jump Between Tabbed Panels: A button on one Tabbed Panel can activivate a different Tabbed Panel, like this: jTabbedPane1.setSelectedComponent(jPanel1); jTabbedPane1 - the name of the tab-strip at the top jPanel1 - the Panel that you inserted to make a "page" in the interface = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Today we will start working on the Functional Prototype, which should include : - a simple interface roghly equivalent to your Visual Prototype - for each button, an Activity Story that explains clearly and simply what should happen in response - actions that respond to button clicks and produce usable results The goals of the Functional Protype are to: - break your problem solution into smaller pieces - create a prototype that you can discuss with the client - start thinking about DATA-STRUCTURES like arrays, lists and objects - try out some ideas that might be tricky to code in Java - finish it quickly - by 30 May Start creating this today. We will continue working on this during class for a couple days next week. You should (must?) use the opportunity to show you work to the teacher and ask questions. ###Project Overview and Action Stories - 3 May 2018 \ We will discuss this document: ~http://ibcomp.fis.edu/275979/ibcomp/projects2014/softwareDesign.html~ ###Continue Word-Search Program - 2 May 2018 \ We ended up with this program: ~netBeans/Letters3.zip~ ###Word Search Program - 27 Apr 2018 \ We will discuss the following program in class: ~netbeans/Letters.zip~ We need to make some of the following changes: - add a list of real words into the puzzle space - make the program CHECK whether a selected word is in the list - add words that are not right-to-left, but in other directions - show the list of "correct words" so the user knows what to find - give a bonus if they find the 3 letters right next to each other - keep score, including bonuses ###Test on JTables - 25 Apr 2018 \ You may use the entire class (50 min) for your test. If you finish early, you may start on your homework. ''= = = HOMEWORK = = ='' Explore this web-site: ~https://thewordsearch.com/~ We will be making similar puzzles starting Friday. ###Invoices - 24 Apr 2018 \ We will write a program to calculate totals in an Invoice:
###More Practice - 20 Apr 2018 \ Answer the questions on this page: ~datastructures/salaries.pdf~ We will write code for a teacher's gradebook, which can add a new column for a new test, and can average all the grades for each student.
###Neighbors in Seating Chart - 19 Apr 2018 \ We wrote the code to search for a name in the seating chart and then display the neighbors of that student. You should add this code to your program:
###Using JTable for Calculations - 17-19 Apr 2018 \ Here are a few problems to solve with JTables: 1 - Record names and salaries of employees. (a) add up the total of all the salaries (b) print the name with the highest salary (c) print the name with the lowest salary (d) print all the salaries that are below average ***(e) copy all the salaries into an array, SORT the array, and print the salaries in order 2 - Type names of students in desks in a classroom with 4 rows of desks with 6 desks in each row (a) count the number of empty desks (b) search for a specific name, e.g. input a name and then say whether the name is found or not ***(c) input a name, find the student, and print the names of the neighbors on the left and right ###JTable - 16 Apr 2018 \ You may watch this video if you wish: ~https://www.youtube.com/watch?v=wniqpx8OQxo~ The teacher will explain the same thing, and demonstrate a Java program with a JTable. Here is the sample code: ~netbeans/JTableSamples.html~ ###Various Project Tools - 13 Apr 2018 \ We will discuss a variety of useful Java tools. Download this project: ~datastructures/DataFiles.zip~ We will discuss the TABS program and the DATECHOOSER class. Here are notes about how to create a Tabbed interface: ~https://blogs.oracle.com/geertjan/tabs-in-netbeans-ide~ You should load the TABS program and: - add one more Tab that does something useful - make a MEANINGFUL CHANGE in EACH of the Tabs ###Saving Data to Disk Files - 12 Apr 2018 \ Download the following NetBeans program: ~http://ibcomp.fis.edu/275979/ibcomp/netbeans/DataFiles.zip~ We will discuss the DataFile program which SAVES text from a JTextArea into a text-file (on the hard-disk) and then LOADS the text again the next time the program runs. ###Continue Visual Prototype - 10 Apr 2018 \ Keep working on your Visual Prototype. If you are "finished" with that, you may do some work for a different class. If you are having trouble finishing, take this opportunity during class to ASK QUESTIONS and GET SOME HELP. This is the last day of class that we will do this in class. You will need to finish your Visual Prototype and do your Client Interview outside class time. ''Planning for the Client Interview'' - write down some questions (a script) that you plan to ask - take your script with you to the interview - encourage the user to TELL STORIES about their problem - be sure to SHOW YOUR VISUAL PROTOTYPE to the user - TAKE NOTES during the interview Here is a video by a professional designer with some useful ideas: ~https://www.youtube.com/watch?v=auQCdrRfYas~ These are general concepts - it's not a "formula". Starting tomorrow we will be learning more Java. ###IA Project Overview - 9 Apr 2018 \ We will discuss these notes about the IA Project: ~http://ibcomp.fis.edu/2017/projects/index2019.html~ ###Visual Prototype - 22-23 Mar 2018 \ Work on a Visual Prototype for YOUR TOPIC. - The goal is to make something that you can SHOW to your client to help elicit a conversation. - PowerPoint is a GOOD tool for this task, but you may use a different tool if you wish. - The goal is to CREATE PAGES that show what the USER will EXPERIENCE when they run the program. This should include: - boxes representing Buttons - boxes showing sample data, like a TextField - separate pages that show a SEQUENCE OF EVENTS that might occur (including specific sample data) After vacation, you will be assigned the task to INTERVIEW your CLIENT, and you should have a nice VISUAL PROTOTYPE to show them. If they don't like it, that's okay - you can always change it. But try to include something that makes it look INTERESTING. How many pages? 10-20 probably makes sense. More isn't necessarily better - clear and interesting is better. Work on this today and tomorrow. ###UX - 21 Mar 2018 \ UX = User Experience The User Experience should be - easy - fun - successful - complete - powerful - cool? exciting? Maybe... and lots of other things. Don't let your design be overwheled and driven by technical details. At the very least, WRAP it in a nice UI (User Interface). Here is a video about UX by a famous DESIGNER (he's also an engineer): ~https://www.youtube.com/watch?v=RlQEoJaLQRA&list=PLR84EITvtzM3iCs3PWHBli8SuXtqvuhwE~ Reasons to Prototype: ~https://designshack.net/articles/graphics/how-why-prototypes-are-mandatory-for-good-design/~ Before your first INTERVIEW with your client, it's useful to create a very basic Visual Prototype. You can use PowerPoint (recommended) to create an animated visual prototype, showing what will HAPPEN when the program runs. It's like a movie preview. You can start making a Visual Prototype today. But keep in mind - it is not supposed to be perfect or extensive. It's purpose is to SHOW the client WHAT YOU ARE THINKING. We can discuss how long you want to spend on this, but not more than couple hours. ###User Oriented Design (UX) - 20 Mar 2018 \ Watch this video: ~https://www.youtube.com/watch?v=O94kYyzqvTc~ Keep in mind that these ideas are for PROFESSIONAL software designers. So it won't all apply to you, but SOME of it will apply to you. What is a PROTOTYPE? ~https://uxmag.com/articles/what-a-prototype-is-and-is-not~ Reasons to Prototype: ~https://designshack.net/articles/graphics/how-why-prototypes-are-mandatory-for-good-design/~ We will discuss how to create a Visual Prototype. ~http://ibcomp.fis.edu/275979/ibcomp/projects2014/quickSimpleStart2015.html~ ~http://ibcomp.fis.edu/275979/ibcomp/projects2014/BigTicTacToePrototype.pdf~ ###Starting Internal Assessment Project - 19 Mar 2018 \ We will start discussing the Internal Assessment Project. Choosing a Topic: ~http://ibcomp.fis.edu/275979/ibcomp/projects2014/ProjectStart2018.pdf~ Example Design Overview: ~http://ibcomp.fis.edu/275979/ibcomp/projects2014/Design.ppt~ Software Design Principles: ~http://ibcomp.fis.edu/275979/ibcomp/projects2014/softwareDesign.html~ '' = = HOMEWORK = = '' Next class, bring an idea for a TOPIC for you IA Project. This is not a permanent decision, but a starting point so that we can do some work related to the IA Project. ###Practice with DrJava - 16 Mar 2018 \ Please try using DrJava for one day. You will learn some things that you won't see in NetBeans. Choose one (or more) of the assignments on this page: ~ibBook/javaBasics/ibcsjava.html~ Copy the code into DrJava, read the notes in the page, and do the Practice exercises at the end. ###USB Sticks and HDD Storage - 14-15 Mar 2018 \ Here is some information about USB stick speeds: ~https://www.pcworld.com/article/2360306/usb-3-0-speed-real-and-imagined.html~ Some answers from yesterday: - Mac OS Journaled is much faster than exFat - DrJava will run fine from the stick, but it is only 12 MB. Larger applications, or non-Java applications, might run poorly. We will discuss the other answers from yesterday. We will be using DrJava for a few days. You can download it here: ~http://www.drjava.org/~ Read the notes and download the program from this web-page: ~http://ibcomp.fis.edu/2017/ibBook/javaBasics/DanceVector/index.html~ You will need to copy the program into a new Java Class in DrJava. When you save it, make sure it is named DanceVector.java ###USB Sticks - 13 Mar 2018 \ Use your new USB Stick for some experiments and answer these questions: 0 - RENAME your USB stick - put your name on it 1 - What is the stated maximum SPEED? Is this for READING or WRITING or BOTH? 2 - Try WRITING a large file to the stick. What is the average Data Transfer Rate? 3 - Try WRITING a FOLDER full of small files to the stick. What is the average Data Transfer Rate? 4 - Try READING the same files back from the stick to the computer. This should be faster - how much faster than writing? 5 - What does "Mac OS X v10.6+" mean? Especially what does the + sign mean? 6 - Find an old NetBeans project and copy it onto the stick. Can you open the project directly from the stick? 7 - Find out what USB 3.0 means, as compared to USB 2.0. 8 - What is the CAPACITY of the stick? Is this the REAL capacity, or just an approximation? 9 - Find a LARGE file (100 MB or more) on the Web and download it DIRECTLY to the stick. Does this work at the same speed as copying from the computer? 10 - Find out what MOUNT means, for example in the Utilities/Disk Utility. 11 - What is the actual capacity stated by the Disk Utility? 12 - What is the fastest way to copy a NetBeans project from one computer to another computer? 13 - Try the following, timing it carefully as you go (by seconds): COMPRESS a folder that contains lots of files, at least 50 MB Copy the .zip archive onto the USB stick Copy the .zip archive back from the USB stick into a HDD folder UNCOMPRESS the .zip archive Now try this (time it carefully) : Copy the same original folder directly to USB stick Copy the folder back from the USB stick onto the HDD It seems like the compression and decomrpession might be a waste of time. But copying small files to a USB stick is quite slow. Which method was faster? 14 - Install a large application, at least 100 MB, onto the USB stick. Now try running it directly from the USB stick. Is it fast enough? 15 - FORMAT your USB Stick to a different File System. Choose one that sounds like it might be faster. Then perform some of the experiments above again to see if it is any faster now. 16 - Download DRJAVA.jar and copy it onto your USB stick. Try running it directly from the USB stick. ###Test - 12 Mar 2018 \ Test on Topic 2 and Topic 6 ###Operating Systems - 9 Mar 2018 \ We will discuss 6.1.5-6.1.9 ~https://docs.google.com/document/d/1ZytDUe0DXAn6iqDpIrwE_U-DveJrA4z0763zN2Ygbas/edit~ ###More Topic 6 - 8 Mar 2018 \ Read the homework from Monday about the future: ~basics/futureHL.pdf~ When you read these "essays", you should be ASKING QUESTIONS that a COMPUTER SCIENTIST would ask, namely: - does this already exist, or something similar? - what new technology will need to develop in order for this to exist? e.g. - hardware developments - software developments - OS developments - infrastructure developments - will this fulfill a role that is currently fulfilled by another product? How will this be BETTER? - faster - more reliable - simpler (cheaper) - smaller (more portable) - why will this new idea be better than what already exists? - will it be USABLE by normal computer users with no additional training, or will new training be required? We will discuss some answers. Then we will discuss 6.1.5-6.1.9. We will start with this article : What is Linux? ~https://www.linux.com/what-is-linux~ = = = EXTRA = Terminal In Mac OS, there are lots of SHORT-CUTS that make it faster and easier to use. These are part of the GUI - the Graphical User Interface. Below this cool interface (which is controlled by the FINDER program), there is actually a Command-Line Interface that is similar to Linux. You can use this feature by running Utilities/Terminal. Here are some notes about Terminal: ~http://blog.teamtreehouse.com/introduction-to-the-mac-os-x-command-line~ For some purposes, like BATCH operations, the CLI may be faster. You don't need to learn this for the IB course, but a basic awareness of CLI will improve your understranding of Operating Systems. ###More about Topic 6 - 7 Mar 2018 \ ''* * Reminder * * '' ''Written test on Monday 12 Mar about:'' ''Topic 2 - ~https://docs.google.com/document/d/1OJ9CYxXkbxDcASnhkxtO-IdIOl_qRe7PS-F93OB2Ooc/edit~'' ''Topic 6 - ~https://docs.google.com/document/d/1ZytDUe0DXAn6iqDpIrwE_U-DveJrA4z0763zN2Ygbas/edit~'' ''Hardware pictures:'' ''~http://ibcomp.fis.edu/275979/ibcomp/review/oldReview/Section3Notes2015.html~'' ''* * * * * * * * * * * * * * * * * *'' Today we will briefly discuss: - Augmented Reality - Virtual Reality - Automation - Autonomy VR and AR Video: ~https://www.youtube.com/watch?v=f9MwaH6oGEY~ ''HOMEWORK'' Read the homework from Monday about the future: ~basics/futureHL.pdf~ When you read these "essays", you should be ASKING QUESTIONS that a COMPUTER SCIENTIST would ask, namely: - does this already exist, or something similar? - what new technology will need to develop in order for this to exist? e.g. - hardware developments - software developments - OS developments - infrastructure developments - will this fulfill a role that is currently fulfilled by another product? How will this be BETTER? - faster - more reliable - simpler (cheaper) - smaller (more portable) - why will this new idea be better than what already exists? - will it be USABLE by normal computer users with no additional training, or will new training be required? Try to find ONE EXAMPLE for each of these questions, where you could answer the question. We will discuss your responses tomorrow in class. ###More about Topic 6 - 5 Mar 2018 \ Operating System History: ~https://www.youtube.com/watch?v=BTQ6HtCkSBQ&t=4s~ Operating System Future: ~https://www.youtube.com/watch?v=PJqbivkm0Ms~ ~https://www.youtube.com/watch?v=P5k-4-OEuTk~ We will continue discussing Topic 6: ~https://docs.google.com/document/d/1ZytDUe0DXAn6iqDpIrwE_U-DveJrA4z0763zN2Ygbas/edit#heading=h.4rcutx92wgnr~ We may look at some of these pictures: ~http://ibcomp.fis.edu/275979/ibcomp/review/oldReview/Section3Notes2015.html~ ###Topic 6 - 1-2 Mar 2018 \ ''HOMEWORK'' Write a half page (2 paragraphs or so) about some computer-oriented development(s) that should/could happen in the next 10 years, but that does not currently exist, including why it would be popular. Turn this in however you wish - due on Monday during class. ======= We will be discussing Topic 6: ~https://docs.google.com/document/d/1ZytDUe0DXAn6iqDpIrwE_U-DveJrA4z0763zN2Ygbas/edit#heading=h.4rcutx92wgnr~ We may look at some of these pictures: ~http://ibcomp.fis.edu/275979/ibcomp/review/oldReview/Section3Notes2015.html~ Optional Reading: What is 5G? ~http://uk.pcmag.com/cell-phone-service-providers-products/82400/feature/what-is-5g~ ###More Binary Arithmetic - 28 Feb 2018 \ We will finish these notes: ~http://ibcomp.fis.edu/275979/ibcomp/review/oldReview/Reading/3-BinaryArithmetic.html~ Then we will begin discussing Topic 6: ~https://docs.google.com/document/d/1ZytDUe0DXAn6iqDpIrwE_U-DveJrA4z0763zN2Ygbas/edit#heading=h.4rcutx92wgnr~ We may look at some of these pictures: ~http://ibcomp.fis.edu/275979/ibcomp/review/oldReview/Section3Notes2015.html~ ###Binary Arithmetic - 27 Feb 2018 \ We will discuss these notes: ~http://ibcomp.fis.edu/275979/ibcomp/review/oldReview/Reading/3-BinaryArithmetic.html~ ###Adder Circuits - 26 Feb 2018 \ Adding Binary numbers ~https://www.youtube.com/watch?v=bsNWzQ3S8pE~ The trick to adding binary numbers is to CARRY correctly. ~http://ibcomp.fis.edu/275979/ibcomp/review/oldReview/Reading/3-BinaryArithmetic.html~ CPUs consist of millions of ciruits, constructed from logic gates. Since a primary function of a CPU is arithmetic, we need to construct a circuit that can ADD. The teacher will explain what HALF-ADDER and FULL-ADDER circuits are.
In case you miss the lecture, or you need a repeat, you can watch this video: ~https://www.youtube.com/watch?v=TOppYqBjZNE~ Then we will continue with a RIPPLE ADDER: ~https://www.youtube.com/watch?v=Cb-2k4oNHZw&t=16s~ ###Test on Binary and Circuits - 16 Feb 2018 \ After finishing your test, you can start reading section 4.4 in your text-book. You may stop after ADDERS. ###Finishing Up - 14 Feb 2018 \ We will finish up: ~basics/PracticeCircuits.pdf~ ~http://ibcomp.fis.edu/275979/ibcomp/circuits/nandgates.pdf~ ###Practice Circuits - 13 Feb 2018 \ We will do these practice exercises: ~basics/PracticeCircuits.pdf~ ~basics/PracticeCircuitsAns.pdf~ ###More NAND Gates - 12 Feb 2018 \ We will continue discussing NAND gates: ~http://ibcomp.fis.edu/275979/ibcomp/circuits/nandgates.pdf~ ''*** Test - Friday 16 Feb ***'' ''Written test on binary numbers and Logic Gates circuits.'' ###NAND Gates - 9 Feb 2018 \ Mr Mulkey is sick. Students should discuss their practice problems with another students. ~http://ibcomp.fis.edu/275979/ibcomp/circuits/Circuit1.pdf~ Then read the following notes and tryl to answer some of the questions: ~http://ibcomp.fis.edu/275979/ibcomp/circuits/nandgates.pdf~ ###Circuits Practice - 8 Feb 2018 \ We finished the 1st page of the circuits practice pages. Today you should attempt to answer all the questions on page 2: ~http://ibcomp.fis.edu/275979/ibcomp/circuits/Circuit1.pdf~ Answer questions 5-10. Work together with another student if you wish. Use the circuit emulator to build and test your circuits: Circuit Emulator : ~http://logic.ly/demo/~ ###Circuits and Logic Gates - 7 Feb 2018 \ We will be discussing Topic 2.1.11 - 2.1.13: ~https://docs.google.com/document/d/1OJ9CYxXkbxDcASnhkxtO-IdIOl_qRe7PS-F93OB2Ooc/edit?usp=sharing~ Video Introduction : ~https://www.youtube.com/watch?v=ksBqkJSq1QE~ Circuit Emulator : ~http://logic.ly/demo/~ Practice Exercises : ~http://ibcomp.fis.edu/275979/ibcomp/circuits/Circuit1.pdf~ NAND Gates and Questions : ~http://ibcomp.fis.edu/275979/ibcomp/circuits/nandgates.pdf~ ###More about CPUs - 5 Feb 2018 \ We will watch this video: ~https://www.youtube.com/watch?v=cNN_tTXABUA&t=29s~ Then we will run this program in the Little Man Emulator: [[ // ADD UP ODD NUMBERS BRA 6 DAT 1 DAT 2 DAT 0 DAT 1 DAT 51 LDA 3 ADD 4 STA 3 OUT 3 LDA 4 ADD 2 STA 4 SUB 5 BRZ 16 BRA 6 HLT .END ][ // Using Line Labels (like variables) BRA START ONE DAT 1 TWO DAT 2 SUM DAT 0 X DAT 1 MAX DAT 51 START LDA SUM ADD X STA SUM OUT SUM LDA X ADD TWO STA X SUB MAX BRZ QUIT BRA START QUIT HLT .END ]] ###CPU Basics - 2 Feb 2018 \ We will be discussing these notes: ~basics/CPUbasics.html~ Watch this video (at least the first half): ~https://www.youtube.com/watch?v=FZGugFqdr60~ Then use the CPU Emulator: ~http://peterhigginson.co.uk/LMC/~ You will need this for the emulator: LDA 4 OTC ADD 5 BRA 1 DAT 65 DAT 1 ###FUN Binary Practice - 1 Feb 2018 \ We will discuss the blue-square .bmp file in these notes: ~http://ibcomp.fis.edu/239179/ibcomp/numbers/codes.html~ ''HOMEWORK'' Read section 5.2 in your book Computer Science Illuminated. Finish reading the entire section before class on Monday. Read as much as you can now in class. Ask questions if you don't understand something. ~https://drive.google.com/uc?export=download&id=0B2t-Tmujl-IbTHlDbGl6MnZFTlU~ (pp 217-238). The page numbers in your paper textbook are different, but it is still section 5.2 Here is a practice game for decimal to binary conversion:
###Binary Storage Examples - 31 Jan 2018 \ We will discuss these notes about binary storage: ~http://ibcomp.fis.edu/239179/ibcomp/numbers/codes.html~ Use a HEX EDITOR to do the Practice Questions in the page above. Here are 2 possibilities for a hex editor: Download this Hex Editor: ~http://ridiculousfish.com/hexfiend/~ If you prefer, you may use this online version: ~https://hex-works.com/eng~ If you are interested in MIME types, read the first 4 paragraphs here: ~https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Configuring_server_MIME_types~ Check-sums are a bit more complicated. Here is some FUN practice with binary: ~http://games.penjee.com/binary-bonanza/~ ###At the BIT Level - 29-30 Jan 2018 \ What is happening inside the computer? Intro by Bettina Blaire ~https://www.youtube.com/watch?v=AkFi90lZmXA~ Binary Numbers Intro to Binary ~https://www.youtube.com/watch?v=Xpk67YzOn5w~ We will discuss these notes about binary storage: ~http://ibcomp.fis.edu/239179/ibcomp/numbers/codes.html~ ''HOMEWORK'' Download this Hex Editor: ~http://ridiculousfish.com/hexfiend/~ If you prefer, you may use this online version: ~https://hex-works.com/eng~ ###System Hardware - 25-26 Jan 2018 \ We will discuss section 5.1 from the textbook. ''Questions'' What is a Device Driver? Are Device Drivers hardware or software? Where do they come from - part of OS or applications or what? Do you need to upgrade or replace Device Drivers? What happens when the computer "boots up"? Why does the boot time get slower and slower on older computers? Are USB sticks faster or slower than hard-disks? How much? Why? What is "over-clocking"? Why not run a CPU at twice the normal clock speed? Here are some useful links about hardware and OS issues. Mac Startup Hotkeys ~https://support.apple.com/en-us/HT201255~ Windows Startup Hotkeys ~https://support.microsoft.com/en-us/help/17419/windows-7-advanced-startup-options-safe-mode~ ###Operating Systems - 23 Jan 2018 \ '' Homework '' Multitasking experiments to try - run 4 Youtube videos simultaneously in 4 windows how many more can you open simultaneously? when does your performance start slowing down noticeably? - Can your speaker (sound system) play 4 audio tracks simultaneously? How many more can you add before problems occur? - Can you play 2 games at once, in separate windows? Why is it difficult to try 10 games at once? - Can you open multiple copies of a Java program that you have written? - If you open a game in "full screen" mode (no windows), do windows "in the background" continue - like will a sound track continue to play? = = = = = = = We will discuss topics 2.1.8, 2.1.6 and 2.1.7. ~https://docs.google.com/document/d/1OJ9CYxXkbxDcASnhkxtO-IdIOl_qRe7PS-F93OB2Ooc/edit~ Here is a good set of notes about OS in a PowerPoint presentation: ~http://www.oakton.edu/user/1/rdai/CIS101/Understanding%20Computers/PPts/UC13.Chapter.05.ppt~ [[ ''Operating Systems'' WIMP = Windows, Icons, Menus, Pointer (GUI OS) GUI Componenets = Buttons, text-boxes, media, lists, menus The main issue here is to recognize the different RESPONSIBILITIES of the OS as opposed to Applications. ''Operating System '' - memory management To load software, the OS must find enough free RAM, then copy the program from secondary memory to primary mem - multi-tasking The computer can have multiple programs loaded and "running". They don't actually run simultaneously. The OS must manage program execution so that one program runs briefly (say 10 ms) and then a different program runs briefly and then a different one - this is called "time-slicing". Some systems allow one program to have "priority" over another. Some unimportant programs run "in the background", like a cloud-storage-synchronization process. It runs whenever nothing important is going on. - device drivers The OS provides a control-interface. Applications make a request, like to use a printer. The app sends data to the OS, then the OS controls the printer and transmits the data. This means that applications don't need to control devices directly, so the application can be simpler. This also provides standardization for controlling the devices. - user interface (GUI or CLI) The OS takes care of drawing all the windows and other GUI controls, as well as accepting keyboard input and producing visual output. Applications use OS modules to control these devices. This provides a standard "look and feel" for the specific platform. ''Applications'' Applications implement the actual LOGIC for useful tasks. For example, a word-processor takes care of choosing fonts, copying and pasting, etc. But the actual keyboard input, display, file management and printer management are done by the OS. word-processor - writing documents spreadsheet - business calculations database - stores and organizes large quantities of data email - sending "mail" to other people web browser - retrieve and render web-pages CAD - draw technical diagrams, for engineers and architects graphics - photo editing, video editing web applications - FaceBook media applications - iTunes calendars communication - Skype, Terminal (FTP) mathematics - graphing, calculating ]] ''HOMEWORK'' Read section 5.1 in your textbook (Computer Science Illuminated) ###Topic 2 - Computer Organization - 22 Jan 2018 \ Here are some notes that we will be using: ~Systems/Topic2.html~ ###Topic 2 - Computer Organization - 19 Jan 2018 \ We will spend a couple weeks discussing Topic 2 - Computer Organization. Here are some notes that we will be using: ~Systems/Topic2.html~ You don't need to read it all today. You can start by watching some videos. Intro to OS : ~https://www.youtube.com/watch?v=pTdSs8kQqSA~ Java Platform : ~https://www.youtube.com/watch?v=2Xa3Y4xz8_s~ Desktop Platforms: ~https://www.youtube.com/watch?v=FUDw5hS8LUU~ [[ ###Interested in an Extended Essay in Computer Science? \ Try reading the information on this web-site: ~http://ib.compscihub.net/ee~ Read the explanation of "Computer Science" in Wikipedia: ~https://en.wikipedia.org/wiki/Computer_science~ Follow the instructions and deadlines you received from Ms McCluskey. Plan on READING a LOT. Plan on WRITING AN ESSAY. Do NOT plan on writing a computer program. ]] ###Sorting the LinkedList - 17 Jan 2017 \ We need to SORT the LinkedList. This will be difficult, because the RECORDS are stored in the list as individual FIELDS. We need to have a better LinkedList, where each ITEM in the list contains an entire RECORD, consisting of a DATE and some TEXT. We need to FIX the list or make a NEW BETTER LIST. Then we can use the BubbleSort algorithm we wrote last week. You can download this program, and then fix it: ~NetBeans/DatesList5.zip~ = = = Tomorrow's Test = = = Tomorrow's test will be about LinkedList programming. It might include other things, like String and array commands, but those were learned previously. This will be a WRITTEN test, and you will need to : - read and TRACE an algorithm (method) - fill in the blanks in an incomplete algorithm - write an algorithm from scratch You are expected to remember, understand and use LinkedList commands correctly. ###Dates Lists - 15 Jan 2017 \ Here is a starting program that displays lists of dates: ~netBeans/DatesList.zip~ We need to improve this program to do the following: - search for a specific date in all 3 lists and display results - sort each list - combine all three lists into a single list and sort it ###Sorting the LinkedList - 11 Jan 2017 \ The following algorithm is supposed to Bubble-Sort the LinkedList: for(int pass = 0; pass < notes.size(); pass = pass+1) { for(int x=0; x < notes.size(); x=x+1) { String a = notes.get(x); String b = notes.get(x+1); if(a.compareTo(b)>0) { notes.remove(x); notes.remove(x+1); notes.add(x,b); notes.add(x+1,a); } } } But it does not work correctly. We need to fix it. ###More with LinkedLists - 10 Jan 2017 \ * add a [delete] button. This must: - input a search term - search for a record that matches the input (use .contains) - use .remove(position) to delete this record * add an [insert] button. This must - input a position number - use .add(position, text) to write the text to the right place * add a [correction] button. This must: - input a position number to choose a record - load the text into the text area - write the position number into a textField - after the user has corrected the text, they click a [commit] button, which: - deletes the previous record with .remove(position) - inserts the new text with .add(position, text) ###LinkedList Practic - 9 Jan 2017 \ Do the following practice exercises: * using the same starting data that you already have, use .remove(position) and .add(another position) to move items so all the records are in normal calendar order * change the [search] method so that rather than returning after it finds a matching record, it continues and finds ALL the records that match the search term. Each time a match is found, it must be ADDED to the existing text, like happens in the [Show All] method. Then one search can produce multiple matching records. * add a [delete] button. This must: - input a search term - search for a record that matches the input (use .contains) - use .remove(position) to delete this record ###LinkedList Appointments - 8 Jan 2017 \ We will discuss the following program: ~Netbeans/Appointments.zip~ Details of LinkedList commands are contained in: ~jets.pdf~ ###Mini-Project Ski Trip - 11-15 Dec 2017 \ Ski Trip You may start with this program, if you wish: ~Netbeans/SkiTrip.zip~ The OHS school is planning a ski trip for 40 students. The HOTEL for the ski-trip has 4 beds in each room. A list of STUDENTS must be assigned to each room. For example: HOTEL------------------------------ | 0 aaa eee iii empty | 1 bbb fff jjj empty | 2 ccc ggg empty empty | 3 ddd hhh empty empty | ........ |---------------------------------- In this example there are 6 empty beds in the first 4 rooms. Your program should allow space for up to 200 students and up to 50 hotel rooms. You may assume the rooms are numbered 0-49. The program should keep track of the following data for each student: - Name - Grade 6-12 - E-mail address - Gender M or F - Hotel room number 0-49 For each student, the trip leader must type in the student name, grade, gender and e-mail address. Then the leader must choose a room for that student. Rooms must be assigned according to the following rules: - each room contains all girls or all boys - all the students in each room must be in the same grade level - there can only be at most 4 students in each room. You must create a Student class that contains variables for the student data. You must use proper encapsulation, meaning that all the data variables must be private, and there must be a GET and SET method for each variable. You must create a GUI interface with appropriate Buttons and TextFields for inputting and outputting data. Your interface class needs to contain a 2-D array to store the Students in their assigned rooms. The program must Sava and Load this array from a disk file. The Ski Trip advisor has requested the following features: - input a student with all their data - name, grade, gender, email and assign the student to a bed in a specific room - save and load all student data with all room assignments - print the names of ALL the students - input a room number and print all the names in that room - prevent improper room assignments, ensuring that all students in each room have the same gender and same grade level - count the total number of empty beds - input a grade and gender and print (System.out.println) all the room numbers that have an empty bed for that data. This would include all the rooms that contain NO students - input a student name and output the room number and the names of the other students in that room If the student's name is not found, print that. - input a student name and remove that student from their current room assignment - Print out (System.out.println) ALL the hotel data, like this: 1 F 11 Bob S. Joe B. empty empty 2 M 11 Mary K. Kim C. Lisa L. Rhonda M. 3 F 9 Julie Z. empty empty empty 4 empty empty empty empty 5 F 11 empty Kim C. empty Nelly N. ..... - Prevent inputting duplicate names. For example, it appears that Kim C. has been assigned to 2 different rooms. - Assign a student to a room that already contains a specific friend. You are unlikely to complete all of this in one week, and it is not necessary. Complete as much as you can this week, including the most significant features, like assigning beds, saving and loading, and printing all the room assignments. Add as much extra features as possible. ''Due Date = Friday 15 Dec 2017 at 18:00 . '' You can work on this in classes this week. ###Searching - 8 Dec 2017 \ Download this new version of KurTheater: ~Netbeans/KurTheater2.zip~ Make sure the SAVE and LOAD buttons work properly. We need more FEATURES in the KurTheater program. Make a button for each of these (as many as you can today): - Mark all missing seats as unavailable, for example all numbers over 21 in row 1 - Count the total number of empty seats - Find an empty seat - Find a PAIR of empty seats, then either reserve the 2 seats or search for another pair (or quit) - Find a customer name an tell what seat(s) they reserved - Cancel a reservation - Display the number of empty seats in each row - display this in a List box - Add up the value of all the empty seats ###KurTheater Seating - 7 Dec 2017 \ We will work on this program: ~NetBeans/KurTheater.zip~ ###Final Dice Simulation - 6 Dec 2017 \ Here is the finished Dice Array Simulation: ~NetBeans/DiceGameSim.zip~ We will look at this web-page: ~http://www.kurtheater-bad-homburg.de/info/index.htm~ There are lots of problems in the world that require a 2-dimensional array of objects. We will write some of these quickly. ###2-D Array Dice - 5 Dec 2017 \ We will continue with the arrays in this program: ~NetBeans/DiceGames3.zip~ ###More Dice Games - 4 Dec 2017 \ We will continue working on this program: ~NetBeans/DiceGames2.zip~ ###OOP Dice Games - 30 Nov 2017 \ We will be working on this program: ~NetBeans/DiceGames.zip~ ###More OOP - 29 Nov 2017 \ We will be working on this scoreboard program: ~NetBeans/OOP2.zip~ Change this program to fit 15 or 16 scoreboards on the screen. Either 5 rows of 3 or 4 rows of 4, depending on what you prefer. Make sure they are all different colors, and that all the text is readable. AFTER you have finished this you need to add one more item to the Scoreboard class - the Scoreboard should display a date, next to the Title. This should be relatively short, like 12/25 or 25.12 . It should be set by the Startup class, when it creates the Scoreboards. ###Introducing OOP - 28 Nov 2017 \ We will be working on this scoreboard program: ~NetBeans/OOP1.zip~ ###Quiz and OOP - 27 Nov 2017 \ #1 - take your quiz (20 minute limit) If you finish your quiz early, you can start reading these notes about OOP: ~https://www.ntu.edu.sg/home/ehchua/programming/java/J3a_OOPBasics.html~ Just read section #1 - Why OOP? #2 - The teacher will explain what OOP means and how this fits in to the IB Computer Science course ###Ethics in Distributed Systems - 22 Nov 2017 \ Privacy in Internet of Things: ~https://www.youtube.com/watch?v=EgLh25ZyMRA~ Security Problems in IoT: ~https://www.youtube.com/watch?v=D3yrk4TaIQQ~ We will discuss some ethical issues, particularly: tagging prisoners, surveillance, CCTV, improved safety systems, medical monitoring, transportation (self-driving cars) ###Notes for Topic 7 - 21 Nov 2017 \ ~https://docs.google.com/document/pub?id=1t51tJpMiITOdkjf5IAvjw4juErErFIl0Xzlq32D1HAc~ ''*** 20 Min QUIZ - on Monday 27 Nov ***'' The quiz will be about vocabulary like: sensor, actuator, processor, SMART vs Dedicated, Stand-alone vs Connected, Internet of Things, Autonomous Agent, etc. ###Discuss Investigation - 20 Nov 2017 \ ~https://docs.google.com/a/fis.edu/document/d/1PyRbSTU-wPppFIae7yWYnzz--ogqbBnod4vi9RbvSI4/edit?usp=sharing~ We will focus on the Internet of Things. ###Continue Topic 7 - 17 Nov 2017 \ Continue with notes about sensors, control and actuators. ~https://docs.google.com/a/fis.edu/document/d/1PyRbSTU-wPppFIae7yWYnzz--ogqbBnod4vi9RbvSI4/edit?usp=sharing~ Use the links at the bottom of the notes page (above) to investigate the Internet of Things. (IoT) ###Topic 7 - 14 Nov 2017 \ Find the lecture notes here: ~https://docs.google.com/a/fis.edu/document/d/1PyRbSTU-wPppFIae7yWYnzz--ogqbBnod4vi9RbvSI4/edit?usp=sharing~ 7.1.1 Discuss a range of control systems. A variety of control systems should be examined such as: - automatic doors - heating systems - taxi meters - elevators - washing machines - process control - device drivers - domestic robots - GPS systems - traffic lights . . . and other common devices. Technical knowledge of specific systems is not expected but students should be able to analyse a specified system. 7.1.2 Outline uses of microprocessors and sensor input in control systems. ~~~~~~~~ We will study some sample control systems. In each case, consider the following questions: What input devices (sensors) must exist in the system? What output devices (actuators/transducers or motors) must exist? What processing must occur to make the system function correctly (input-processing-output)? What rules must be implemented as decisions in the embedded controller? You might want to think about processing first, and then think about inputs and outputs. For the most part, there is little storage in embedded controllers, or at least nothing interesting. ###Quiz about Array Algorithms - 13 Nov 2017 \ Complete your quiz and turn it in (25 minutes). We will take a break from Java programming and study Topic 7 in the IB Course Guide: ~http://xmltwo.ibo.org/publications/DP/Group5/d_5_comsc_gui_1201_1/html/67.207.142.65/exist/rest/app/gui.xql@doc=d_5_comsc_gui_1201_1_e&part=2&chapter=3.html~ You have some homework to complete before class tomorrow: Watch this video about self-driving-cars: ~https://www.youtube.com/watch?v=AiOxUcDgsa8~ Read this article about self-driving-cars: ~https://www.economist.com/news/science-and-technology/21696925-building-highly-detailed-maps-robotic-vehicles-autonomous-cars-reality~ ###Class Cancelled - 10 Nov 2017 \ Class is cancelled today to watch FIS play football. ###More Array Algorithms - 9 Nov 2017 \ We will discuss the algorithms from yesterday, as well as the DUPLICATES algorithm from the day before. We must also write an algorithm that DELETES a duplicate value from an array. We will have a 25 min quiz on Monday 13 Nov. This time the grade will be recorded. ###Array Algorithms Practice - 8 Nov 2017 \ ~NetBeans/ArraysPractice1.html~ ###Sorting Quiz and Other Algorithms - 7 Nov 2017 \ First do your quiz and turn it in (limit 25 min). Then write a program that does the following: - Start with an array containing int values. Remove all the DUPLICATE values, leaving only one copy of each existing value. Change all the duplicate values to zeroes. This make sense as long as the original array contains only positive values - no zero values. For example: {3,5,7,5,4,6,7,3} ==> {3,5,7,0,4,6,0,0} The idea for this algorithm is straightforward - at each value in the array, scan the entire array (except for the starting position) and whenever you find a duplicate, change it to 0. Then do the same at the next position in the array. Bring a working solution to class tomorrow, or bring a non-working version and ask questions. ###Faster Bubble Sort - 2 Nov 2017 \ The quiz is postponed until our next class - that will be on Tuesday 7 Nov. Today we will make the FASTEST Bubble Sort that we can. We need to discuss BEST CASE, WORST CASE and AVERAGE CASE Scenarios. ###Simple Sort and Bubble Sort Details - 1 Nov 2017 \ The teacher will explain how Simple Sort works, as well as how Bubble Sort can be made faster. Here are some notes that might be helpful: ~http://ibcomp.fis.edu/Sorting/IntroNotes.html~ ###Sorting Efficiency - 30 Oct 2017 \ Download this program: ~netBeans/sorting1.zip~ We will study the EFFICIENCY of various sorting algorithms for a couple days. Then we will have 25 min quiz on Thursday 2 Nov. ###Even More Sorting - 27 Oct 2017 \ You may download this program and use it if you wish: ~NetBeans/UsingArrays2.zip~ or you may use the program you already have and add this code: [[ // add import java.io.* at the top of the program private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) { // reads names from a file into titles[] array try { titles = new String[100]; BufferedReader info = new BufferedReader( new FileReader("names6.txt")); for(int x=0; x < 100; x = x+1) { titles[x] = info.readLine(); } info.close(); } catch(Exception ex) { output(ex.toString()); } } private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) { // Bubble-sort titles array for(int pass = 0; pass < 100; pass=pass+1) { for(int x=0; x < 99; x = x+1) { if(titles[x].compareTo(titles[x+1])>0) { String a = titles[x]; String b = titles[x+1]; titles[x] = b; titles[x+1] = a; } } } } ]] If you add that code to your old program, you will still need to download the names6.txt file and copy it into your project, in the main folder: ~NetBeans/names6.txt~ ###More Sorting - 26 Oct 2017 \ You can download this program: ~NetBeans/UsingArrays.zip~ or, if you prefer, use the program that you already wrote. (1) Run the program and check that the [Sort] button works correctly. (2) Add a couple more titles to the titles[] array. Check that the [Sort] button still works correctly. (3) Use this web-site animation: ~https://www.cs.usfca.edu/galles/visualization/ComparisonSort.html~ to watch how the Bubble-sort actually works, step by step. (4) Change the SORT method in your program to sort the titles in reverse order, from Valtari to ABBA. (5) Watch the SELECTION SORT on the animation site (above). Then read about a SELECTION SORT on this web-site: ~http://www.java2novice.com/java-sorting-algorithms/selection-sort/~ Then try to copy the Java code into your program to correctly implement a Selection sort. We will discuss sorting in greater depth on Friday. ###Text Puzzle - 25 Oct 2017 \ We will make a Java program to show a puzzle like the text puzzles in this video: ~https://www.youtube.com/watch?v=xjp0Y9PTg0A~ We will resume working on arrays in our next class. ###Sorting Arrays - 24 Oct 2017 \ We will discuss this program: ~http://ibcomp.fis.edu/2017/ibBook/javaBasics/CDlistSorted/index.html~ ###GUI Interface for Arrasy - 20 Oct 2017 \ We will make a GUI interface for yesterday's program, including the part that searches for a year. ###Arrays (lists) - 19 Oct 2017 \ We will discuss this program: ~http://ibcomp.fis.edu/2017/ibBook/javaBasics/CDlist/index.html~ // HOMEWORK // Make the program work, like Mr Mulkey did // ADD the ability to search for a YEAR, like 2016 --> Jimmy // sped 15 min at home, then stop ###Tabbed Interface Program Due - 18 Oct 2017 \ Your Tabbed Interface Questions Program is due today at 15:00. You need to find the FOLDER containing your program, COMPRESS that folder, and then upload the .ZIP file into Haiku. If you don't know how to COMPRESS a folder, you should ask the teacher for help. ###Using TABBED Interface - 10 Oct 2017 \ Questions about the program we started yesterday? Then we will look at this program: ~Netbeans/UsingTabs.zip~ ''Programming Project'' Due date = Wed 18 Oct 2017 Your assignment is to write a program using a Tabbed Interface. The program must present several (at least 10) educational or interesting questions. The user must select an answer, and the program tells them whether they are correct. Include a variety of types of questions/answers/controls, e.g.: - true/false - using Buttons - multiple choice - using Radio Buttons - selecting from am awt.List box - fill-in-the-blank, using a TextField - multiple correct answers, using Buttons that change color and/or become inactive - anything else that is different/challenging/entertaining more variety is better Put each question in its own TAB. Your program should include a TIMER that measures the total amount of time between starting and ending. The topic(s) of the questions is up to you, but should be in good taste. The questions should NOT be about video games - just about anything else is acceptable. ###Lists and Arrays - 9 Oct 2017 \ We will continue our Ubahn Times program, this time using Lists and Arrays: ~Netbeans/Arrays.zip~ ###Some Fun and Practice - 28 Sep 2017 \ We will continue the Ubahn program after vacation. Today you can do the following practice program: ~Netbeans/Jumper.pdf~ ###Date and Time Objects - 27 Sep 2017 \ We will continue working on the Ubahn times program. We need to compare the ACTUAL arrival times to the SCHEDULED arrival times. So we will need to get those times from the RMV web-site, or maybe copy them off the poster at the Hohemark stop. ###Date Objects - 26 Sep 2017 \ Here is a web-site with notes about Dates: ~https://www.ntu.edu.sg/home/ehchua/programming/java/DateTimeCalendar.html~ Here is some sample code using Date objects: [[ private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { String start = jTextField1.getText(); String end = jTextField2.getText(); Date startDate = new Date(start); Date endDate = new Date(end); long startMillis = startDate.getTime(); long endMillis = endDate.getTime(); long total = endMillis - startMillis; long oneMinute = 1000*60; double elapsedTime = total / oneMinute; String elapsed = elapsedTime + " minutes"; jTextField3.setText(elapsed); } ]] You can download the entire project here: ~netbeans/DateApps.zip~ ''=== Quiz Tomorrow ==='' ###Formatting Decimals - 25 Sep 2017 \ We will discuss the following code: private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { String price = jTextField1.getText(); double money = Double.parseDouble(price); double tax = money*0.18; double total = money + tax; DecimalFormat df = new DecimalFormat("0.00"); jTextField2.setText(""+df.format(total)); } // HOMEWORK: // Make 4 boxes for 4 prices // a Button ADDS UP the 4 prices // and puts the result in a 5th box // nicely formatted to 2 decimal places ###Standard Classes and Objects - 22 Sep 2017 \ We will be working through some of the notes and exercises in Capter 3 of this book: ~https://kea.nu/files/textbooks/intro.pdf~ ''HOMEWORK'' The following code makes a JButton twice as wide. [[ private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { System.out.println(jButton1.getWidth()); int w = jButton1.getWidth(); int h = jButton1.getHeight(); int x = jButton1.getX(); int y = jButton1.getY(); w = 2*w; jButton1.setBounds(x,y,w,h); // finish this so the second button moves below // but does not change its size } ]] If there is another JButton next to it, the code needs to move that JButton down to the next line, below this JButton. Finish the code to do that. You will have a 5 minute Quiz about this code on Monday. ###NetBeans GUI Practice - 20 Sep 2017 \ Write a separate CLASS (jFrameForm) for each task below. 1. Make a program with 2 Buttons. When you click one button, the other button disappears. This must work for both buttons - clicking either one makes the other button disappear. 2. Make a program with one TextField and one Button. The user should type their name into the TextField, then press the Button. When they click the Button, the program uses OUTPUT to tell how many letters are in the name. 3. Make a program with 6 buttons, each with a number on it. The user is to click buttons until the total is 100. After each button is clicked, it must become DISABLED. Choose numbers so there is only one correct solution, like 20 + 30 + 50. 4. Make a True/False quiz. Display a statement in a jLabel. Have a [True] and a [False] button. After a button is clicked, the color of the background should change to red or green, depending on whether the answer is right or wrong. 5. Make a program that contains 2 List boxes (use AWT List - it's simpler). One List box contains English words, the other contains German words. The use should double-click on matching words, like "help" and "hilfe". If a correct pair is chosen, the program must announce "RIGHT". ###Strings Quiz + Netbeans GUI - 18 Sep 2017 \ After your quiz (15 min), you should DOWNLOAD, RUN and INVESTIGATE this program: ~GUInetbeans/Generic.zip~ INVESTIGATE means: - run the program - try each component (button, text field, etc) - if you find an error, read the Java code and try to figure out why it failed - try to make changes (start with simple changes) - try to add more components ###Data in Strings - 14 Sep 2017 \ We will do some of the exercises in these notes about Strings: ~Strings/dataStrings.pdf~ We will have a 15 min quiz on Monday 18 Sep - this will be a written quiz, no computers, no notes. Make sure you understand the String commands in this summary: ~../Strings/howto.htm~ ###More Strings, Dates and Times -11-13 Sep 2017 \ We will continue with these notes about Strings, Dates and Times. ~ibBook/javaBasics/StringExamples.html~ String Reference Notes: ~../Strings/howto.htm~ If you need clear explanations of the Reference Notes, try this book - in section 4.5: ~http://uzza.us/cs/java/Java%20Concepts.pdf~ ###GUI Design in NetBeans - 6 Sep 2017 \ ~https://www.youtube.com/watch?v=JZTIIchUa6E~ We will write a Password program in NetBeans. Here are notes about how to do it: ~netBeans/Instructions.pdf~ The teacher will demonstrate how to create the program. Then do some of the practice exercises. ###More Strings, Dates and Times - 31 Aug 2017 \ Here are some practice notes about Strings, Dates and Times. ~ibBook/javaBasics/StringExamples.html~ ###Times and Dates - 29 Aug 2017 \ Here is a program that processes Dates for a library. ~ibBook/javaBasics/overdueBooks/index.html~ We will discuss the problems associated with Dates and Times, especially in international environments. ###Strings and Characters - 28 Aug 2017 \ Passwords Program ~ibBook/javaBasics/Password/index.html~ Section 3.3 in Textbook ~https://drive.google.com/uc?export=download&id=0B2t-Tmujl-IbTHlDbGl6MnZFTlU~ ''Homework'' Read section 3.3 in your textbook before Monday 11 Sep. ### Numbers INSIDE Computers - 25 Aug 2017 \ We will discuss 3.1 and 3.2 from the textbook. ~https://drive.google.com/uc?export=download&id=0B2t-Tmujl-IbTHlDbGl6MnZFTlU~ This is contained in the IB Syllabus in items 2.1.9 and 2.1.10. ~https://docs.google.com/document/d/1OJ9CYxXkbxDcASnhkxtO-IdIOl_qRe7PS-F93OB2Ooc/edit~ ###Rolling Random Dice - 24 Aug 2017 \ We will discuss this program for rolling dice: ~ibBook/javaBasics/RollDice/index.html~ ###More Calculations - 23 Aug 2017 \ The teacher will show how to SOLVE AN EQUATION using a Java program and Guess and Check. You need to take notes during the lecture, as you will not receive a printed or electronic copy of the program. ###Calculations continued - 22 Aug 2017 \ ''Textbooks'' We will pass out textbooks today. Then we will discuss HOW to keep track of which students have which book. ''This week = NUMBERS '' We will be studying the concepts in Chapter 3: 3.1, 3.2 You should EITHER: - read 3.1 and 3.2 thoroughly before Friday OR - take clear and complete notes during class and use the book as a helpful reference Either way, you need to learn all the concepts that are covered in 3.1 and 3.2 . '' Next week = WORDS AND LETTERS '' Today we will continue discussing the Calculations program: ~ibBook/javaBasics/Calculations/index.html~ ###Calculations in Java - 21 Aug 2017 \ ''Turn in your Smartphone Assignment'' You may turn this in however you wish - either as an electronic document or as a paper document. Whatever you choose, you must inform the teacher. Start Haiku, find the Smartphone assignment, and WRITE A MESSAGE telling the teacher how you are turning in your assignment. ''NetBeans'' 1. Make sure you have Netbeans installed. If not, you should ask for help - it must be done today. 2. Create a new Java Application. 3. Create a new Java Class, named Calculations. 4. Open these notes : ~ibBook/javaBasics/Calculations/index.html~ Copy the Java program into your NetBeans class. 5. Run the program and make sure it works properly. 6. Make the changes prescribed in the notes. ###Smartphone System - 17 Aug 2017 \ We will discuss the Smartphone System described in: ~systems/computerSystems.html~ ''HOMEWORK - due Monday at the beginning of class'' Answer the last question from the Smartphone Scenario: - Imagine that you are hired by the school as a computer systems consultant. What questions would you ask? What advice would you give? You should spend 30-60 minutes on this, write less than one page, and it needs to be a document either typed or hand-written. The teacher will collect this on Monday. This is a Formative Assessment Task - that means the teacher will read it and make comments, but it will not receive a grade. ###First Day - 16 Aug 2017 \ ==Today's Assignment * How do we define the term COMPUTER? ~http://searchwindowsserver.techtarget.com/definition/computer~ * We will discuss these notes Computer Systems Notes about computer SYSTEMS: ~systems/computerSystems.html~ ==Homework - ''Read these notes Computer Systems Notes'' ```~systems/computerSystems.html~ ```and be prepared to discuss them next class. - ''Install NetBeans'' You need to install it and bring it to class tomorrow in working condition. You can download it at: ~https://netbeans.org/downloads/~ Choose the Java SE version (smallest download). -- OR -- ~http://www.oracle.com/technetwork/articles/javase/jdk-netbeans-jsp-142931.html~ to download NetBeans WITH the Java JDK. -- OR -- borrow a USB stick from the teacher. ### Tests \ ~https://www.dropbox.com/s/yoi9a73txzwpkw7/SimpleCalcutator.zip?dl=0~ IOT and Sensors: ~http://www.iot-inc.com/category/iot-components/sensors-actuators/~ Sensors, actuators, transducers - thorough and detailed ~http://www.iot-inc.com/category/iot-components/sensors-actuators/~ Technology Enablers - cool overview: ~https://insights.10000ft.com/projects/60439/tools/147344~ Michael Brookes Topic 7 Notes ~https://docs.google.com/document/pub?id=1t51tJpMiITOdkjf5IAvjw4juErErFIl0Xzlq32D1HAc~ http://dhqidlhxoobsrbt2m4drehs.webdav.drivehq.com/webdav