Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class GlavnaKlasa {
- public static void main (String[] args){
- Televizor tv;
- tv = new Televizor();
- try {
- tv.pojacajZvuk(99999);
- }catch (NijeUkljucenException izuzetak) {
- izuzetak.printStackTrace();
- }
- ///////////////////////////////////
- public class Televizor {
- int trenutniKanal;
- final int MAX_KANAL = 255;
- final int jacinaZvuka;
- public int pojacajZvuk(int zaKoliko) throws NijeUkljucenException {
- if ( !ukljucen) {
- NijeUkljucenException izuzetak = new NijeUkljucenException();
- throw izuzetak;
- }
- if( (zaKoliko+jacinaZvula) < 100 || zaKoliko > 0){
- }
- jacinaZvuka += zaKoliko;
- return jacinaZvuka;
- }
- public int promeniNaSledeci() {
- if(ukljucen) {
- }
- trenutniKanal++;
- return trenutniKanal;
- }
- }
- /////////////////////////////////////////////////////////////
- public class NijeUkljucenException extends Exception {
- public NijeUkljucenException() {
- super();
- }
- public NijeUkljucenException(String poruka) {
- super(poruka);
- }
- }
- //////////////////////////////
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement