Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View nbavafa's full-sized avatar

Nicholas Bavafa nbavafa

  • Amazon AWS
  • University of California, San Diego
View GitHub Profile
@nbavafa
nbavafa / Chiro
Created March 11, 2015 21:12
DoctorsOffice
package interitanceLab;
public class Chiropractor implements DoctorsOffice{
private int patientsWithBackProblems;
private double costsPerCustomers;
private int numDoctors;
private int doctorSalary;
public Chiropractor(int patients, double costs, int doctors, int salary) {
patientsWithBackProblems = patients;
costsPerCustomers = costs;
@nbavafa
nbavafa / Commission
Last active August 29, 2015 14:15
Staff
package inheritance;
public class Commission extends Hourly{
public double sales;
public double commission;
public double allSales;
public Commission (String eName, String eAddress, String ePhone,
String socSecNumber, double rate, double commissionRate) {
super (eName, eAddress, ePhone, socSecNumber, rate);
commission = commissionRate;
@nbavafa
nbavafa / Kangaroo
Created February 18, 2015 03:44
Mammal
package mammal;
public class Kangaroo {
private double pouchVolume;
private double highJump;
private double tailLength;
public double getpouchVolume() {
return pouchVolume;
}
@nbavafa
nbavafa / Bus
Created November 18, 2014 22:02
Bus
package BusStationPackage;
public class BusStation {
private String Address;
private Bus bus1;
private Bus bus2;
//non-parameterized constructor
public BusStation() {
@nbavafa
nbavafa / Problem Set
Last active August 29, 2015 14:07
ProblemSet6
-------------------------------------------------------------------------------------------------------------------
Pset 6
1. What is an infinite loop?
An infinate loop is a loop that does not end and has no quit condititon
2. How do you prevent an infinite loop?
By having a condiditon in which the loop will end/quit.
2. Create a while loop which:
1. Checks to make sure that the user entered a positive number
@nbavafa
nbavafa / Test
Created October 1, 2014 01:43
Test
If public will link work?