IB CS SL 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" % ]] ###Software Failures - 18 June 2018 \ Top 10 software failures ~https://www.youtube.com/watch?v=AGI371ht1N8~ Your assignment today - find an interesting story about a software development failure. Stories are easy to find - there are lots of failures. We will discuss your stories tomorrow - be prepared to briefly present your story. Write down some notes! ###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 - 11 June 2018 \ Here are answers to the Final Exam: ~YearEnd2018/FinalExam2018answers.pdf~
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~ ###Turning in your Functional Prototype - 25 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~ 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 ###Sample Final Exam - 17 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. We will start with this program: ~netBeans/SortingNumbers.zip~ and then discuss Algorithm Efficiency for: Linear Search Linear Search on Sorted List Binary Search Dictionary Search ###Algorithm Efficiency - 17 May 2018 \ We will start with this program: ~netBeans/SortingNumbers.zip~ and then discuss Algorithm Efficiency for: Linear Search Linear Search on Sorted List Binary Search Dictionary Search ###Algorithm Efficiency - Big O - 16 May 2018 \ Here are some extensive notes about Algorithm Efficiency. ~http://ibcomp.fis.edu/files/BigO/bigo.htm~ We will use this program to study algorithm efficiency: [[ public class SortNums { double[] titles = new double[100000]; public SortNums() { makeNums(); sortList(); printList(); } void makeNums() { for(int c = 0; c < titles.length; c++) { titles[c] = c; } } void sortList() // an ineffient BubbleSort algorithm { for(int pass = 0; pass < titles.length; pass = pass + 1) { int count = 0; for(int x = 0; x < titles.length-1; x = x+1) { if( titles[x] < titles[x+1]) { double first = titles[x]; // swapping neighbors double second = titles[x+1]; titles[x] = second; titles[x+1] = first; count = count + 1; } } if(count==0) { return; } } } void printList() { for(int c = 0; c < 10; c=c+1) { System.out.println("[" + c + "]" + titles[c]); } for(int c = titles.length/2-5; c < titles.length/2+5; c=c+1) { System.out.println("[" + c + "]" + titles[c]); } for(int c = titles.length-10; c < titles.length; c++) { System.out.println("[" + c + "]"+ titles[c]); } System.out.println("========"); } public static void main(String[] args) { new SortNums(); } public String input(String prompt) { return javax.swing.JOptionPane.showInputDialog(null,prompt); } public void output(String message) { javax.swing.JOptionPane.showMessageDialog(null,message); } } ]] ###Searching and Sorting in Arrays - 11 May 2018 \ We will discuss SORTING and SEARCHING ALGORITHMS. We will work on this sample program: ~http://ibcomp.fis.edu/2017/ibBook/javaBasics/CDlistSorted/index.html~ We will look at this Visual Simulation: ~https://visualgo.net/en/sorting~ ###Starting Activity Stories and Functional Prototype - 4-9 May 2018 \ Today we will start working on the Functional Prototype for your IA Project, 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~ ###JTable Test - 27 Apr 2018 \ ###Invoices - 25 Apr 2018 \ We will write a program to calculate totals in an Invoice:
###More Practice - 23 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.
###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 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 ###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 and Loading Text-files - 11 Apr 2018 \ Read these notes: ~datastructures/String2TextFile.html~ ###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. 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 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 - 16 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. ###Using DrJava - 14-15 Mar 2018 \ 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 ###Finish Operating Systems - 9 Mar 2018 \ We will finish 2.1.7-2.1.8 ~https://docs.google.com/document/d/1OJ9CYxXkbxDcASnhkxtO-IdIOl_qRe7PS-F93OB2Ooc/edit~ ###Operating Systems - 8 Mar 2018 \ We will discuss 2.1.6-2.1.8 ###USB Sticks - 6 Mar 2018 \ Use your new USB Stick for some experiments and answer these questions: 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? ###Continue Discussing History and Future - 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~ Hardware and History: ~http://ibcomp.fis.edu/275979/ibcomp/review/oldReview/Section3Notes2015.html~ Topic 2 ~https://docs.google.com/document/d/1OJ9CYxXkbxDcASnhkxtO-IdIOl_qRe7PS-F93OB2Ooc/edit~ ###Software and Other Expansion - 2 Mar 2018 \ We will discuss Software from an historical point of view: ~http://ibcomp.fis.edu/275979/ibcomp/review/oldReview/Section3Notes2015.html~ ###History and Hardware - 28 Feb 2018 \ We will discuss Hardware from an historical point of view: ~http://ibcomp.fis.edu/275979/ibcomp/review/oldReview/Section3Notes2015.html~ ###Test - 27 Feb 2018 \ After finishing the test, begin reading section 1.2 in your text-book. You may begin reading online: ~https://drive.google.com/uc?export=download&id=0B2t-Tmujl-IbTHlDbGl6MnZFTlU~ You may read quickly - you do not need to remember all the details. ###NAND Gates - 26 Feb 2018 \ ~http://ibcomp.fis.edu/275979/ibcomp/circuits/nandgates.pdf~ ###Practice Circuits - 14-15 Feb 2018 \ We will discuss these practice exercises: ~basics/PracticeCircuits.pdf~ Answers ~basics/PracticeCircuitsAnswers.pdf~ ''*** TEST ***'' ''We will have a 30 min test on Tuesday 27 Feb'' ''about binary and circuits.'' ###More Circuits Practice - 9 Feb 2018 \ Mr Mulkey is sick today. You should discuss your answers to questions 1-7 with another student. Then attempt to answer questions 8-10 in these notes: ~http://ibcomp.fis.edu/275979/ibcomp/circuits/Circuit1.pdf~ ###Circuits Practice - 8 Feb 2018 \ Today you should attempt to answer questions 1-7 in these notes: ~http://ibcomp.fis.edu/275979/ibcomp/circuits/Circuit1.pdf~ 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 ###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=9GDX-IyZ_C8~ 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 \ ''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. ~http://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 BITS - 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. ###At the BIT Level - 29 Jan 2018 \ What is happening inside the computer? Intro by Bettina Blaire ~https://www.youtube.com/watch?v=AkFi90lZmXA~ We will discuss these notes about binary storage: ~http://ibcomp.fis.edu/239179/ibcomp/numbers/codes.html~ If you prefer, you may use this online version: ~https://hex-works.com/eng~ ###System Hardware - 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 \ 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 presented as a PowerPoint: ~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 - 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~ ###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/DatesList3.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 - 16 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 any list - search for specific text in any list - sort each list - combine all three lists into a single list and sort it ###Data Collection Day - 12 Jan 2017 \ Spend today collecting data. What data? We need lists of data attached to specific days. These could be: - birthdays of famous people - holidays - important historic events - political/religious/national celebrations We need to collect data into TEXT DOCUMENTS. This can be done on Google Docs. - create a document for a specific list - SHARE the document, with EDIT priveleges, with all students in the class (and the teacher) - find data (recomment Wikipedia) and type it into the appropriate list Here is an example: [[ 01.01 New Years Day -------- 01.06 3 Kings Day -------- 02.02 Ground Hog's Day -------- etc..... ]] We need at least 4 lists, and LOTS of data in each list - as much data as you can gather in 50 min. We have 8 students and a teacher working, Each RECORD can have as many lines of text as you wish, but be sure that: - each record starts with a date - the date is in a standard format, either YYYY.MM.DD or just MM.DD - every record ends with dashes -------- - the dates do NOT need to be in order - we will sort it later These lists will be used as input for the program we start writing on Monday. ###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. ###LinkedList Practice - 10 Jan 2017 \ Do the following practice exercises: * 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 Appointments - 8 Jan 2017 \ We will discuss the following program: ~Netbeans/Appointments.zip~ For notes about LinkedList commands, read p.8 in this: ~Jets.pdf~ ###Bookstore Database - 11-15 Dec 2017 \ We will do a small project this week, starting with this program: ~Netbeans/Bookstore.zip~ = = = Mini-project = = = This week you must improve the Bookstore program. The intended users (parents in the Bookstore) have requested the following features: - students can purchase items, paying cash - students can purchase items on CREDIT (pay later) - the program saves a record of ALL TRANSACTIONS - the program can print a list of ALL TRANSACTIONS - student names are stored and VALIDATED before payment/credit is accepted - it is possible to calculate a BALANCE for each student, telling how much money (credit) they still owe, and printing a list of all the transactions for that student - the program accepts and saves PAYMENT transactions, when a student pays cash to cover previous CREDIT transactions. These payments need not match actual purchases, so they can pay extra if they wish (like 100 Euros when they owe 80 Euros) - calculate a total of all the cash that has been paid for all students - print all the transactions for a specific item, especially for a Sports Trip, so the workers can make a list of all students who have paid, and then the Athletic Director can see who has NOT paid - print a list of all students who still have a negative balance, meaning their CREDIT transactions exceed their PAYMENT transactions - print a list of all students who owe more than 50 Euros You may work on this during class each day this week. You must complete as many of these items as possible by Friday 15 Dec. You should have a separate button for each feature. You may add more or different features, as long as they make sense. ''The DUE DATE for this project is 15 Dec at 18:00.'' ###Lockers - 8 Dec 2017 \ Download this program: ~Netbeans/Lockers.zip~ We will continue developing this program. ###Finished Dice Game - 6 Dec 2017 \ Here is the finished dice game with 6 dice: ~Netbeans/DiceGames6.zip~ Oops! Not QUITE finished. We need to add the 6th Die. Then we will start working on a Lockers Database. Random assignments? Probably not. = = = HOMEWORK = = = Make a first try at the AssignLockers program. (1) Create the Locker class, like this, but with all the get and set methods for num, name, homeroom and grade: [[ public class Locker { // ENCAPSULATION private int num = 0; private String name = ""; private String homeroom = ""; private int grade = 0; public Locker(int number) // Constructor { num = number; } public void setGrade(int g) { if(g >= 6 && g <= 12) { grade = g; } else { System.out.println("GRADE NUMBER EXCEPTION - BAD VALUE = " + g); // CODE and ERROR MESSAGES should be VERBOSE // TEST OFTEN } } public int getGrade() { return grade; } } ]] (2) Create a Jframe Form for Assigning lockers, with a Button and 4 TextFields to input num, name, homeroom and grade, and to create a new Locker and assign the input values, starting like this: [[ private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) { int locker = Integer.parseInt(jTextField1.getText()); String name = jTextField4.getText(); Locker mine = new Locker(locker); locker.setName(name); } ]] ###OOP Dice Games - 4-5 Dec 2017 \ We will be working on this program: ~NetBeans/DiceGames.zip~ We will look at how to create an ARRAY of Die objects and how to use FOR loops to process the data. ###Reading about OOP - 30 Nov 2017 \ Read the handouts you were given - online version here: ~https://www.ntu.edu.sg/home/ehchua/programming/java/J3a_OOPBasics.html~ Just read section #1 - Why OOP? Then read p. 160-166 in Lewis and Loftus: ~https://kea.nu/files/textbooks/intro.pdf~ Type the RollingDice program into NetBeans and get it working properly. Monday we will start making a nicer RollingDice program. ###Introducing OOP - 29 Nov 2017 \ We will be working on this scoreboard program: ~NetBeans/OOP2.zip~ ###Introducing OOP - 28 Nov 2017 \ We will be working on this scoreboard program: ~NetBeans/OOP1.zip~ ''== Homework =='' Read these notes (section 1. only): ~https://www.ntu.edu.sg/home/ehchua/programming/java/J3a_OOPBasics.html~ ###Data Objects - 20-21 Nov 2017 \ We will discuss this program: ~http://ibcomp.fis.edu/2017/ibBook/javaBasics/TripList/index.html~ ###Quiz and Starting OOP - 16 Nov 2017 \ #1 - take your quiz (15 minute limit) #2 - The teacher will explain what OOP means and how this fits in to the IB Computer Science course ###More Array Algorithms - 15 Nov 2017 \ ''*** 15 min Quiz Tomorrow about Array Algorithms ***'' Here are some more ALGORITHM problems that we may try to solve. You should use NetBeans and write Java ALGORITHMS for each problem. - input a number and find it in the array, print "found" or "missing" {5,15,12,8,11} find = 8 --> FOUND {5,15,12,8,11} find = 9 --> MISSING - input a smallest and largest value, and count the number of items that are between those two limits {5,15,12,8,11} max = 20 min = 10 --> 3 items - find all the numbers that are larger than 10 and change each value to 0 {5,15,12,8,11} --> {5,0,0,8,0} - calculate the AVERAGE (mean) by adding up all the values in the array and then dividing by the length of the array, and then print out all the numbers that are larger than average {5,15,12,8,11} --> total = 51 ave = 51/5 = 10.2 - in a SORTED array, INSERT a new value in the correct location {5,8,11,12,15}, insert 10 --> {5,8,10,11,12,15} ''Google Fiber (from Wikipedia)'' Google Fiber is part of the Access division of Alphabet Inc.[2] It provides fiber-to-the-premises service in the United States, providing broadband Internet and IPTV to a small and slowly increasing number of locations.[3] In mid-2016, Google Fiber had 68,715 television subscribers and was estimated to have about 453,000 broadband customers.[4] The service was first introduced to the Kansas City metropolitan area,[5] including 20 Kansas City area suburbs within the first 3 years. Initially proposed as an experimental project,[6] Google Fiber was announced as a viable business model on December 12, 2012, when Google executive chairman Eric Schmidt stated "It's actually not an experiment, we're actually running it as a business," at the New York Times' DealBook Conference.[7] Google Fiber announced expansion to Austin, Texas, and Provo, Utah, in April 2013, and subsequent expansions in 2014 and 2015 to Atlanta, Charlotte, the Triangle, Nashville, Salt Lake City, and San Antonio.[8] On August 10, 2015, Google announced its intention to restructure the company moving less central services and products into a new umbrella corporation, Alphabet Inc. As part of this restructuring plan, Google Fiber would become a subsidiary of Alphabet and may become part of the Access and Energy business unit.[9] In October 2016, all expansion plans were put on hold and some jobs were cut.[10] Google Fiber will continue to provide service in the cities where it is already installed. ###More Algorithms Practice - 14 Nov 2014 \ We will continue practicing with these 7xercises: ~NetBeans/ArraysPractice1.html~ ###Class Cancelled - 10 Nov 2017 \ Class is cancelled today. Too many athletes absent, and we will watch the FIS team playing football. ###More Array Algorithms - 9 Nov 2017 \ Here are some practice array algorithms: ~NetBeans/ArraysPractice1.html~ ###Better Bubble Sort - 8 Nov 2017 \ We will look at how to make a Bubble Sort faster. Download this program: ~netBeans/sorting1.zip~ ###Simple Sort Trace - 6 Nov 2017 \ We will discuss the reliability and efficiency of the Simple Sort Algorithm. Read these notes: ~http://ibcomp.fis.edu/Sorting/IntroNotes.html~ ###Sorting Efficiency - 1-2 Nov 2017 \ Download this program: ~netBeans/sorting1.zip~ We will study the EFFICIENCY of various sorting algorithms for a couple days. ###More Sorting - 27 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. ###Text Puzzle - 25-26 Oct 2017 \ It would be good if Julian could help the others who were absent yesterday. We will make a Java program to show a puzzle like the text puzzles in this video: ~https://www.youtube.com/watch?v=xjp0Y9PTg0A~ In NetBeans, you need to create a TextArea. Make it as large as the window (JFrame). In the TextArea, set LineWrap to TRUE. Type LOTS of text into the TextArea, like you saw in the video with OOOOOOCOOOO or MMMMMMMMMMMNMMMMMMM or XYXXXXXYXXXXXYXX. You can try using whole words, like BACON, and then switch letters in one word, e.g. BAOCN. Put several TextAreas into TABS. ###GUI Interface for Arrays - 23 Oct 2017 \ We will make a GUI interface for Friday's program, including the part that searches for a year. ###Arrays (lists) - 20 Oct 2017 \ We will discuss this program: ~http://ibcomp.fis.edu/2017/ibBook/javaBasics/CDlist/index.html~ ###Finish Tabbed Interface Program - 19 Oct 2017 \ Your Tabbed Interface Questions Program is due today at 18: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. ###Tabbed Interface Questions Program - 11 Oct 2017 \ Programming Project Due date = Thu 19 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 - 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. ###Finish Fraction Buttons - 10 Oct 2017 \ We need to finish the program we started yesterday. Then we will look at this program: ~Netbeans/UsingTabs.zip~ Then we wil have a 5 minute quiz. ###More Buttons - 9 Oct 2017 \ Here is one more practice program with lots of buttons: ~Netbeans/DateApps2.zip~ Download the program and do the practice exercises listed at the end of the InOrder program. Plan on a 5 minute quiz tomorrow, based on the code from these buttons. ###Using the Date Class - 27 Sep 2017 \ First a Quiz. Then we will write a program using new Date() and .getTime() to calculate the number of days between 2 dates. ''=== HOMEWORK ==='' Create the following program. Then write down 5 TEST CASES = actual dates that assure us that the program functions correctly. String start = jTextField1.getText(); String end = jTextField2.getText(); Date s = new Date(start); Date e = new Date(end); long total = (e.getTime()-s.getTime()) / (1000*60*60*24) + 1; jTextField3.setText("" + total); ###More Components Practice - 26 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 - 25 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~ ###NetBeans GUI Practice - 21 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 a List box (use AWT List - it's simpler). This should contain 4 answers for a multiple-choice question, which is shown in a JLabel above the List box. If the user clicks the correct answer, it announces "CORRECT", otherwise it announces "Wrong". ###Investigating GUI Controls - 20 Sep 2017 \ 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 But the teacher will explain some of the program's features in class. You should ASK QUESTIONS during the explanation. ###Strings Quiz + Netbeans GUI - 19 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 ###String Programming Practice - 15 Sep 2017 \ Practice for the quiz by doing some of the problems in these notes: ~Strings/StringPractice.html~ If you get stuck, you can look at these answers: ~Strings/StringPracticeAnswers.pdf~ But if you look at the answers, don't COPY them. Instead, read the answer and then WITHOUT LOOKING type that program into NetBeans. If it doesn't work, look at the answers again and then make corrections. ###Email Validation - 14 Sep 2017 \ We will work on the Email program in ~ibBook/javaBasics/StringExamples.html~ We will have a 15 min quiz on Tuesday 19 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 \ Here are some practice 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. ###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'' (1) Memorize powers of 2: 2^0 = 1 2^1 = 2 2^2 = 4 2^3 = 8 2^4 = 16 2^5 = 32 2^6 = 64 2^7 = 128 2^8 = 256 2^9 = 512 2^10 = 1024 (2) Find 5 interesting non-ASCII characters and their codes (probably Unicode) ###Quiz and Books - 24 Aug 2017 \ Do your quiz. Then start reading 3.3 in your book. You should finish reading 3.3 before Monday. Ignore the last part about Huffman Encoding. ###Calculations continued - 23 Aug 2017 \ ''Today's Lecture'' Solving equations with Java and Guess and Check. The teacher will write a program and explain it. You must TAKE NOTES, writing down the program from the board. ''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 Monday 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 - 22 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 Scenario - 18 Aug 2017 \ ''HOMEWORK - due Tuesday 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 Tuesday. 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. https://dhqidsa8biigm3685ypga9u.webdav.drivehq.com