Category Archives: Computer Science

Intro to CS [2018-19]

Unit 4 . Parameters and Objects [advanced] 

  • Complete Packets:
    • #18 Writing a Class Level Method
    • #20 Saving an Object to a New Class
    • #21 Stepwise Refinement (Follow the instructions carefully on this one). If your method does not seem to work, it’s probably because you switched a left leg with a right leg
    • #22 Passing Arguments
    • Assignments here 

 Unit 4 . Loops

  • Complete Packets:
    • 15 b (The Loop Instruction)
    • 16 (The While Instruction)
  • Assignments here

 


 

Unit 3 Datatypes and if/else

 

Unit 2

  • Complete packets #9-10  
    • #9 (variables)
    • #10 functions vs methods
    • Drag Racing
    • Spaceship Repair
    • Apollo 15
    • End of Unit Assign

Assignments and Quiz topics


Unit 1

  • Complete packets #3- 8  by Thursday Wednesday 27th
    • #1 (Example tutorial)
    • #2 (skipped)
    • #3 Coach–opacity, color
    • #4 Camera and manipulating objects (turn,tumble etc)
    • #5a Alice code (how to add instructions)
    • #5b  Alice Primitive Methods
    • #6 ( camelCase,  — read only, no tutorials)
    • #7 ( primitive methods from object tree)
    • #8 (do together )
  • Project #1
    • at least 10 instructions
    • modify a ‘subpart’
    • 1 do-together statement
    • at least 3 different objects
    • Worth 7 points.
    • To get a 7/7 you must achieve the ‘wow factor’–ie go above and beyond to create a superior final project
    • you must save your file in the format of
      • lastname-assignment1
      • morris-assignment1
  • Eventual Quiz 1 
    • binary number systems (see dropbox notes for review)
    • converting from various bases to base 10(see Google drive notes for review)
    • comment vs instruction in alice

 

 

 

 

 

Last year’s 

 

Web Design Programming 18-19

Supa Web

Phaser.io resources and links

 

 

Unit 4 Bootstrap 4

  • Class PPT’s on bs4
  • Bootstrap 4 documentation
  • Bootstrap 4 @ www
  • Download the bs4  (unzip this then copy contents of the “dist” folder to a “bs4/” folder in your project (https://getbootstrap.com/docs/4.1/getting-started/contents/#css-files)
  • cdn paths : https://www.bootstrapcdn.com

    •  
  • Colors (bg-danger, text-success etc..)

Unit 3 Jquery

 

Unit 2 Javascript

 

Unit

Mr M Assignment (reproduce the screenshots in the powerpoint)

 

 

Useful Links

 

Useful Websites

Alice Unit 4 [Loops] Assignments

Assignment 4.1)  

Centigrade to Fahrenheit Modification: Modify the Fahrenheit to centigrade project as follows.

  1. Use a while loop to do as many temperature conversations as  the user wantswhile-command-alice
  2. Ask the user for yes no (helphelp-icon-11-256)

mpg-loop-donahue


Assignment 4.2)loop-command-alice

 Miles Per Gallon Modification: Modify the miles per gallon project in the same way as the prior exercise.

  1. At the start, ask the user how many mpg conversions,  they want to convert.
  2. Then use a loop to do that many conversionsloop-command-alice

gabby_mpg_loop_times

 

4.25 ) Guess Animal’s weight assignment

Assignment 4.3) Open assignment. Your open project must have each of the following criteria

  1. a variable
  2. store the return value of a function into that variable
  3. a loop of some kind

 

4.4 Rock Paper Scissors 

 

Nested Loops Projects

 

Nested Loop Starter Code


Method 1) printRectangle()

Change the code from the demonstration of nested loops so that you output the following pattern below. Call this method printSqure()

screenshot.1416


Method 2 and 3)

diagAndBrders()                                                    noDiag()

diagonal_only                      diagonal


Method 4)

printMultiplicationTable()

 

multiplication-table-console-view

Setting up VIM

VIM is a very powerful editor.

Follow the steps below to set it up. I am using windows and you might need to slightly modify certain steps like #2 for Mac (not sure)

Part I : Install Git desktop program

1) first install git : https://git-scm.com/downloads

Part II. Install GVim

For Windows:
Download and run the executable  installer
2) Uncheck “make plugin directory” at install. (We will create our own folder called “bundle” later that serves the same purpose)

For Mac: 
(consider macvim and/or using homebrew)

 

setting up vim

 


For steps 3 and 4, you can just download this folder: bundle (unzip it and put it into your main Vim folder, as shown in picture above), or you can follow steps 3 and 4
3) create a folder called “bundle” in the core vim folder.
4) in “bundle”, you must put the vundle.vim folder (see picture at bottom). You must put Vundle.vim inside bundle.
5) Create a folder called ‘tmp’  . We will configure our vimrc  to store temporary files there (Otherwise, they get saved in CWD and youre directories end up getting littered with lots of ugly temporary vim files)
6)  Feel free to use my customized _vimrc . That file should be in your root vim folder as you can see in the screenshot at the bottom. (BTW, you must remove the “.txt” extension.)
7)Run Gvim . (If you’re using my vimrc  , you’ll get an error first time, but that’s ok). The actual gVim application is in the folder called vim80 (or whatever version of gVim you’re running. If you installed vim 7.9, then you’d look in the vim79 folder or the like)
8)Let’s install some plugins using Vundle. To do, just type: the following :PluginInstall  (Yes, do type the the colon)

 

To type you must press either “i” or “a” which puts you into insert mode.

Lynda PHP Assignments[2016-17]

Both classes

Back to SUPA 3rd/4th quarters

 

Should watch “history of php” from https://www.lynda.com/MySQL-tutorials/PHP-MySQL-Essential-Training/119003-2.html

and then

“configuring php” from https://www.lynda.com/MySQL-tutorials/PHP-MySQL-Essential-Training/119003-2.html

Then go to the appropriate video course

NOTE: if you were in CS II last year, you *must* use Option 1, unless you get permission from me.

 

PHP Web Design  PHP Mysql

 Skip introduction, do everything else

Unit 1

Skip installation, go right to “first steps”

 

Supa Web Programming 2016-17

Quarter 3

NOTE: if you were in CS II last year, you *must* use Option 1, unless you get permission from me.

  1. PHP
    1. Option 1 : PHP for Web Designers link
    2. Option 2: PHP with Mysql Essential Training link

You should use Option 2 if you either a) feel confident in your programming background or have experience programming outside of the class 2) took the AP class last year.

SKIP Installation unit except for Configuring php

 

Full assignment breakdown here 

 

 

Below are some courses that you can explore as you consider ramping up your skills for the 4th quarter independent study.

Further study in PHP .

  1. PHP and MySql beyond the basics (link) . Pre-req for the MVC patterns. This shows you how to use OOP, something I’d recommend for the AP students. Most MySql connections now require OOP(object oriented programming)
  2. MVC pattern for php applications link  . Note Laravel is, by far, the most respected framework . At the end, I would recommend using Laravel. If not, try codeigniter
  3. PHP and Ajax Good for anyone interested in modern websites . Or for more interactive games
  4. Creating Secure Websites (link)

HTML5/Javascript Games

  1. Learn how to use the most popular game framework, phaser.io, with this video : https://www.lynda.com/Phaser-tutorials/HTML5-Game-Development-Phaser/163641-2.html
    1. Making Asteriods with Phaser (link) . Asteriods is a classic “first game”. You would need to make more than just a single game, but it would be a good start.

 

Quarter 4

This quarter will be comprised of an extended independent project that can be focused on anything web related. Note: If you are taking next year’s AP class, you must choose a rigorous programming project.

a) choosing a long term project that requires extended learning.  At least 1-3 Lynda.com classes (I will need to see that you completed 100% of at least 1 class)

b) you must write a proposal that details

  1. what the final product will be
  2. What new skills/learning you will undertake to achieve this new product
  3.  what Lynda course(s) you will study to learn the skills from #2

Limitations of Inheritance

why Interfaces Are Useful

We are going to write a class that sorts some of the classes we have already written –namely : the Account and Student classes that we wrote in the past. Specifically, this class is going to sort Student and accounts by their grade point averages and their account balances , respectively..

Organizer Skeleton class (You only have to fill in 1 method)

Class : Organizer

The Constructor

  • The constructor is completely written for you already. It creates an array of Accounts and an array of Student. It also sends the arrays to both of the sort methods described below. You only need to write 1 method : public static void sort (Student[] arr) which is described below.

Accessor Methods

  • Sort Methods
    • public static void sort(Account [] arr)// Implemented this for you
    • public static void sort (Student[] arr) //basically…modify the sort method above so that it works for the Student class by comparing how old they are

What if we wanted to sort the PlayList class and add the method void sort(PlayList[] lists)?

Answer: We’d have to yet again add a whole new method that is very similar to the two sort methods we already wrote