Category Archives: Computer Science

Compiled and Interpreted Languages

Comilers and Interpreters

Retrieved from http://en.wikibooks.org/wiki/Introduction_to_Programming_Languages/Interpreted_Programs

Retrieved from http://en.wikibooks.org/wiki/Introduction_to_Programming_Languages/Interpreted_Programs

java-compiler-interpreter

retrieved from http://www.greenteapress.com/thinkapjava/html/thinkjava003.html

 

compiler_interpreter

retrieved from http://www.pasteur.fr/formation/infobio/python/ch05s02.html

 

Playlist Project [Array]

A PlayList project will be based on Three Classes

The Artist class will store core information about an artist

The Song class will store basic information about a music song

The PlayList class will manage lists of songs and artists


 

Artist

  • Constructor(s) :
    public Artist( String name) { //missing code }

 

  • Instance Variables (“global” variables)

 

Methods

 


 

Song

Constructor(s):

Instance Variables

example of how to get current milliseconds as a long

Method

 


 

Artist

Song

PlayList


 

PlayList

  • Instance Variables
    • private String listName : This is the ‘name’ of your playList
    • private Song[] songs;
    • private  int[] stars ; //how many stars each song has between 0 and 5 inclusive.
    • Note: songs and stars are parallel Arrays
  • Constructor
    • public PlayList(String name) : There should be only 1 constructor that takes a parameter representing the name of the playList
  • Accessor Methods
    • public double averageRating() // returns the average star rating for the list
    • public double averageRating(Artist artist)  // returns the mean star rating associated with artist
    • public Song[] getSongs(Artist artist) // returns an array populated by the songs of the parameter artist
    • public Song[] getSongs() // returns all the songs in the list

    Mutator Methods

    • public void swap(Song song1 ,  Song song2 )  // switches positions of these two (maintain parallelism!)
    • public void  add(Song song , int stars)
    • public void removeSong(Song song, String artist )  //removes song associated with artist
      • Note: Be careful here. You are allowed to add the same song and artist. Duplicates are allowed.
    • public void removeArtist(Artist artist ) //removes all elements associated with artist
    • public void removeLowStars(int cutOff) //removes all elements associated with a star rating less than cutOff
    •  ** public PlayList sortByDate() //this returns a rearranged PlayList based on each Song’s date
    • ** public PlayList sortByRating() //this returns a rearranged playlist so that the 5 starred elements are the first group in the list, 4 stars second …1 stars, last
    • ** public PlayList shuffle() //this returns a new PlayList in which all of the songs have been reordered randomly.

Artist

Song

PlayList

Representing Data

Representing Data

You will be responsible for understanding the core concepts behind all the formats/file types (listed in chapter 3 of the book for representing for various types of data (text, images, video), the pros and cons of different formats and when it is appropriate to use different formats. For instance, jpg’s are meant to realistically represent photographs and use color averaging, while GIF’s have a max  of 256 colors and therefore  have much smaller file sizes than jpegs ; the latter are not a good choice for representing photographs but rather for cartoons or line art. Both of these are Raster not vector shapes.

Representing Graphics

Video

The Information Level [IB CS]

This page is dedicated to the generic information level topics for the IB computer science curriculum. For our school it coincides with Chapter 2 of the Computer Science Illuminated  text book.

 

 

  • Numbers (binary, BCD, Hex)
  • Data Representations
  • Text Data
    • ASCII, Unicode,
    • Compression
  • Audio Data
    • MP3 Format and other formats
  • Graphical Data
    •  colors , graphics
  • Video Data
    • codecs

 

 

Resources:

 

Computer Hardware

This page correlates with Unit 3 in our book and focuses on circuits, gates and  chips

Good websites on this unit’s topics

  • Computer Hope, has a lot of general computer /tech things including lots on hardware

 

A Great Discussion at Quora about the question “What do low level programmers know that high level ones don’t? This discussion helps explain reasons to better understand how hardware and OS concerns do affect programmers.

Logic Gates

 

Circuits

  • Combinational Circuits
  • adders, multiplexers
  • Circuits as memory

 

CPU Chapter 5

ALU ( The arithmetic logic unit) Chapter 5, p. 128

Computing Components

 

Stored-Program Concepts

Embedded Systems

Parallel Architectures

Online Computer Science Resources

Lynda.com Courses

 Binary Numbers

Web Developmemnt

Learning Java

  • Stanford’s Online Youtube Video set “Programming Methodology
  • Udacity’s  Intro to Java Class
  • self paced, and run by Cay Horstman a well known programming educator who, among other things, has worked with parts of the college board’s AP exam

    Syllabus

    Lesson 1: Introduction to Computers, Programming Languages, Algorithms, and the Java Programming Environment
    Lesson 2: Introduction to Classes and Objects
    Lesson 3: Graphics
    Lesson 4: Fundamental Data Types
    Lesson 5: Decisions
    Lesson 6: Iterations
    Lesson 7: Arrays, ArrayLists and Simple Array Algorithms
    Lesson 8: Methods (Parameter Passing, Instance vs. Static Methods)
    Lesson 9

  • edX – into to Java
    • not self paced
  • Syllabus
    Week 1: Introduction to computing systems from hardware, software and problem solving aspects
    Week 2: Basic data types, variables, assignment statements and expressions
    Week 3: Objects, classes and methods; scope rules, Java documentation
    Week 4: Boolean expressions, control structures
    Week 5: Loops
    Week 6: Arrays and multidimensional arrays
    Week 7: Character string and file I/O
    Week 8: Recursion
    Week 9: Abstract data type
    Week 10: Simple event-driven programming and wrap up

  • : Inheritance

  • j

 

Web programming

Vim Text Editor

From Quora : https://qph.is.quoracdn.net/main-qimg-cfa6d48e266956d943f576c44ec4152c?convert_to_webp=true

 

Installing Vim:

  1. get Vim
  2. follow these instructions (windows 7)

Overview of Vim, with some examples of what it can do for you

Some good Youtube vids

Plugins

 

Beyond the basics

 

Helpful Shortcut