2015-09-16 HW03

posted Sep 16, 2015, 8:24 AM by Samuel Konstantinovich   [ updated Sep 16, 2015, 8:30 AM ]
HW03:
    Install Emacs and run through the tutorial + a video tutorial. 
    If you can't install Emacs, watch a tutorial on how to install Emacs... ><
    If you can't find a tutorial click here:





lisa.stuy.edu 149.89.160.100
homer.stuy.edu 149.89.150.100
bart.stuy.edu 149.89.151.100
marge.stuy.edu 149.89.161.100

307:   149.89.150.xxx  
      cslab1-1 ... cslab1-30  where xxx is 101-130

325:   149.89.151.xxx  
    cslab2-1 ... cslab2-30  where xxx is 101-130

251:   149.89.160.xxx  
    cslab3-1 ... cslab3-31  where xxx is 101-131

451:   149.89.161.xxx  
    cslab4-1 ... cslab4-32  where xxx is 101-132

SSH to any host with a final number 101-105 using its ip address
 *nix command: ssh user@host
 Win: puTTY

File transfer (also to hosts from 101-105) uses SFTP: Filezilla  (port 22)

Resources:
Very Basic Linux Tutorial for n00bs and forgetful people:  https://www.digitalocean.com/community/articles/an-introduction-to-linux-basics

More detailed Linux/Unix tutorial:

Java code for reference:

EXAMPLE 1:

file: helloworld.java

public class helloworld{
    public static void main(String[]args){
        System.out.println("Hello world");
    }
}

EXAMPLE 2 (2 files)
file: Demo.java

public class Demo{
    public static void main(String[]args){
        something X,bob;
    
        //create 2 instances of the something class (instantiate)
        X=new something();
        bob=new something();

        //manually set the variables inside of the X object:
        X.a=3;
        X.b=-2;

        //call the method 'print' from in the something class
        X.print();
        bob.print();
    
    }
}

file: something.java

public class something{
    int a,b;
    public something(){
    }

    public void print(){
        System.out.println(a+","+b);
    }
}
Comments