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 interface LogInterface { | |
void log(); | |
} | |
public class FileLogger: LogInterface { | |
public void log() {Console.WriteLine("logged to file");} | |
} | |
public class User { |
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 FileLogger { | |
public void log() {Console.WriteLine("logged to file");} | |
} | |
public class User { | |
FileLogger logger = new FileLogger(); | |
public void saveUser() { | |
//... save operations |
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 interface DailyWork { | |
void WakeUp(); | |
void FeedDog(); | |
} | |
public interface WeekdayWork { | |
void GoWork(); | |
} | |
public class WeekDays: DailyWork, WeekdayWork { |
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 interface DailyWork { | |
void WakeUp(); | |
void FeedDog(); | |
void GoWork(); | |
} | |
public class WeekDays: DailyWork { | |
public void WakeUp() { | |
//... | |
} |
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 interface Human { | |
void Eat(); | |
} | |
public interface IRunnable { | |
void Run(); | |
} | |
public class Man : Human, IRunnable { | |
public void Eat() { |
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 interface Human { | |
void Eat(); | |
void Run(); | |
} | |
public class Man : Human { | |
public void Eat() { | |
//eat code | |
}; |
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 Computer { | |
public int cpuCount; | |
public int ramSize; | |
//.... | |
} | |
public class Notebook : Computer { | |
private bool batteryType; | |
private int screenSize; | |
//.... |
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 Currency { | |
private string currencyCode; | |
private string currencyName; | |
private double currencyValue; | |
public string getCurrencyCode() { | |
return currencyCode; | |
} |
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 CurrencyCodes { | |
private string currencyCode; | |
private string currencyName; | |
private double currencyValue; | |
public string getCurrencyCode() { | |
return currencyCode; | |
} |
NewerOlder