This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package rc1; | |
public class Course { | |
String name; | |
int cap; | |
String dept; | |
Professor prof; | |
public Course(String name, int cap, String dept, Professor prof) { | |
this.name = name; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
class Client { | |
private float height; | |
private String name; | |
private float collarSize; | |
public Client(float height, String name, float collarSize){ | |
this.height = height; | |
this.name = name; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.lang.reflect.Array; | |
public class myArr<E> { | |
//inner class that lets you zip a list into pairs | |
public class Pair<F, S> { | |
private F first; | |
private S second; | |
public Pair(F first, S second){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class myArrTemplate<E>{ | |
//inner class that lets you zip a list into pairs | |
public static class Pair<F, S>{ | |
private F first; | |
private S second; | |
public Pair(F first, S second){ | |
this.first = first; | |
this.second = second; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class myArrTemplate<E>{ | |
//inner class that lets you zip a list into pairs | |
public static class Pair<F, S>{ | |
private F first; | |
private S second; | |
public Pair(F first, S second){ | |
this.first = first; | |
this.second = second; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package rc2; | |
/** | |
* | |
* @author khayyamsaleem A class that creates an interface for an array | |
* @param <E> | |
* generic parameter | |
*/ | |
public class MyArray<E> { | |
private E[] data; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package rc2; | |
/** | |
* | |
* @author khayyamsaleem A class that creates an interface for an array | |
* @param <E> | |
* generic parameter | |
*/ | |
public class MyArray<E> { | |
private E[] data; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package rc2; | |
/** | |
* | |
* @author khayyamsaleem A class that creates an interface for an array | |
* @param <E> | |
* generic parameter | |
*/ | |
public class MyArray<E> { | |
private E[] data; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const generatePlayerBoard = (numberOfRows, numberOfColumns) => { | |
let board = []; | |
for(let numberOfRowsIndex=0; numberOfRowsIndex < numberOfRows; numberOfRowsIndex++){ | |
let row =[]; | |
for (let numberOfColumnsIndex = 0; numberOfColumnsIndex < numberOfColumns; numberOfColumnsIndex++) { | |
row.push(' '); | |
} | |
board.push(row); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#This is a calendar | |
from time import strftime, sleep | |
USER_FIRST_NAME = "Tristan" | |
calendar = {} | |
def welcome(): | |
print "Welcome " + USER_FIRST_NAME + "." | |
print "Calendar is opening...." | |
sleep(1) |