Skip to content

Commit

Permalink
Merge pull request #401 from sydneyhauke/fb-all-instruments
Browse files Browse the repository at this point in the history
[G4] Instrument implementations
  • Loading branch information
wasadigi authored Mar 9, 2017
2 parents 9fd9a31 + b05b089 commit 71a6ca0
Show file tree
Hide file tree
Showing 8 changed files with 182 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package ch.heigvd.res.lab00;

public class Lute implements IInstrument {
private static final String sound = "tingting";
private static final int volume = 10;
private static final String color = "brown";

@Override
public String play() {
return sound;
}

@Override
public int getSoundVolume() {
return volume;
}

@Override
public String getColor() {
return color;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package ch.heigvd.res.lab00;

//@author Tano Iannetta
class Lyre implements IInstrument {

private String sound = "drlingdrling";
private int volume = 10;
private String color = "golden";

public Lyre(){
}

public String play()
{
return sound;
}
public int getSoundVolume()
{
return volume;
}
public String getColor()
{
return color;
}


}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package ch.heigvd.res.lab00;

/**
* Implementation of Mallet
* @author Remi Jacquemard
*/
public class Mallet implements IInstrument {

public String play() {
return "stomp";
}

public int getSoundVolume() {
return 10;
}

public String getColor() {
return "blue";
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package ch.heigvd.res.lab00;

/**
*
* @author SILVERCORP
*/
public class Mandolin implements IInstrument {

private String color = "golden";
private int soundVolume = 10;

public Mandolin() { }
public String play() { return "zing";}
public int getSoundVolume() {return soundVolume;}
public String getColor() { return color;}


}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package ch.heigvd.res.lab00;

/**
* @author Loan Lassalle
*/


public class Maracas implements IInstrument
{
String sound;
int soundVolume;
String color;

public Maracas()
{
sound = "TshTsh";
soundVolume = 17;
color = "wood";
}

public String play()
{
return sound;
}

public int getSoundVolume()
{
return soundVolume;
}

public String getColor()
{
return color;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package ch.heigvd.res.lab00;

/**
* Created by Colin Lavanchy on 28.02.17.
*/
public class Marimba implements IInstrument {
@Override
public String play() {
return "dumdumdum";
}

@Override
public int getSoundVolume() {
return 15;
}

@Override
public String getColor() {
return "brown";
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package ch.heigvd.res.lab00;

/**
*
* @author Lemdjo
*/
/*Add implementation for Mellophone*/
public class Mellophone implements IInstrument{
public Mellophone() {}

public String play() {
return "Pouet";
}
int getSoundVolume(){
return 0;
}
String getColor(){
return "Golgen";
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package ch.heigvd.res.lab00;

/**
*
* @author Aurelie Levy
*/
public class Melodeon implements IInstrument {
public String play() {
return "Tralala";
}

public int getSoundVolume() {
return 5;
}
public String getColor(){
return "white";
}
}

0 comments on commit 71a6ca0

Please sign in to comment.