Şimdi Ara

Java Ödevi Acil Yardım

Daha Fazla
Bu Konudaki Kullanıcılar: Daha Az
2 Misafir - 2 Masaüstü
5 sn
11
Cevap
1
Favori
961
Tıklama
Daha Fazla
İstatistik
  • Konu İstatistikleri Yükleniyor
0 oy
Öne Çıkar
Sayfa: 1
Giriş
Mesaj
  • Beyler ödevi son güne bırakmak zorunda kaldım önemli bi ödevde şimdide işin içinden çıkamıyorum ilk kez java alıyorum bi el atabilecek varsa büyük adamlık yapmış olur..

    Ödev aynen şu..

    All your classes and methods have to be well commented for java doc generation. Make use of @param, @return commands to explain your classes. Assignments not properly commented will be penalized up to -10 points.
    In this assignment, you are going to implement two classes: Time and Event. Time has the data members int hour, int minute and int mode. Event has data members Time start, Time end, String name.
    Class invariants for Time: hour has to be between 1-12. minute has to be between 0-59. mode has to be either 0 (representing AM) or 1 ( representing PM).
    Class invariants for Event: start and end cannot be null. start comes before end.
    You are given a demo file (tester.java) and its correct output (output.txt). You classes should contain the appropriate methods and constructors so that tester class, when compiled and run, yields output.txt.







  • quote:

    Orijinalden alıntı: hakanfd

    Beyler ödevi son güne bırakmak zorunda kaldım önemli bi ödevde şimdide işin içinden çıkamıyorum ilk kez java alıyorum bi el atabilecek varsa büyük adamlık yapmış olur..

    Ödev aynen şu..

    All your classes and methods have to be well commented for java doc generation. Make use of @param, @return commands to explain your classes. Assignments not properly commented will be penalized up to -10 points.
    In this assignment, you are going to implement two classes: Time and Event. Time has the data members int hour, int minute and int mode. Event has data members Time start, Time end, String name.
    Class invariants for Time: hour has to be between 1-12. minute has to be between 0-59. mode has to be either 0 (representing AM) or 1 ( representing PM).
    Class invariants for Event: start and end cannot be null. start comes before end.
    You are given a demo file (tester.java) and its correct output (output.txt). You classes should contain the appropriate methods and constructors so that tester class, when compiled and run, yields output.txt.
    57.m/hjg dt



    < Bu mesaj bu kişi tarafından değiştirildi rob dö şambır -- 30 Nisan 2013; 16:12:59 >




  • Default Time Constructor t1=12:00 PM
    ***
    Three params Time Constructor t3=09:30 AM
    ***
    Create Time t4 by Setters
    Time by Getters for t4 Hour=3 Minute=45 isAM=1
    ***
    t3-t4=-375 minutes
    t4-t3=375 minutes
    ***
    t4 before t3=false
    t3 before t4=true
    ***
    Copy Constructor t5 copy of t3
    t5=09:30 AM
    ***
    Time Equality Test
    t5 equals t3=true
    ***
    Event Created by t3 an t4
    Event e2=Name:Object Oriented Assignment ( Start->09:30 AM End->03:45 PM )
    Duration of Event e2=375
    ***
    Class invariance violation Test
    Test 1
    Updated New t3=04:30 PM
    No change on Event e2=Name:Object Oriented Assignment ( Start->09:30 AM End->03:45 PM )
    Test 2
    Updated Time Get from Event Start=11:15 AM
    No change on Event e2=Name:Object Oriented Assignment ( Start->09:30 AM End->03:45 PM )
    ***
    Event e3=Name:Office Hours on Wednesday ( Start->02:00 PM End->05:00 PM )
    Duration of Event e3=180
    ***
    Event e4 Before Update=Name:Lusnch Brreak ( Start->11:00 AM End->01:00 PM )
    Duration of Event e4 Before Update=120
    ***
    Update Event e4 by Setters
    Event e4 After Update by Getters Name=Lunch Break Start=12:00 PM End=01:00 PM
    Duration of Event e4 After Update=60
    ***
    Event e6=Name:Counter Strike Match ( Start->10:00 AM End->12:00 PM )
    ***
    e2 overlaps e3=true
    e3 overlaps e4=false
    e4 overlaps e6=true
    ***
    Event e5=Name:Lunch Break ( Start->12:00 PM End->01:00 PM )
    ***
    Event Equality Test
    e4 equals e5=true
    e4 equals e3=false
    Name:Lunch Break ( Start->12:00 PM End->01:00 PM )
    End date before start. Date. Program aborted !!!




  • public class Tester {

    /**
    * @param args
    */
    public static void main(String[] args) {
    Time t1=new Time();
    System.out.println("Default Time Constructor t1="+t1);
    System.out.println("***");

    //Exception Throws
    //Time t2=new Time(24,70,false);
    //System.out.println("Exception Time Cons t2="+t2);

    Time t3=new Time(9,30,Time.AM);
    System.out.println("Three params Time Constructor t3="+t3);
    System.out.println("***");

    System.out.println("Create Time t4 by Setters");
    Time t4=new Time();
    t4.setHour(3);
    t4.setMinute(45);
    t4.setMode(Time.PM);
    System.out.println("Time by Getters for t4 Hour="+t4.getHour()+" Minute="+t4.getMinute()+" isAM="+t4.getMode());
    System.out.println("***");

    System.out.println("t3-t4="+t3.substract(t4)+" minutes");
    System.out.println("t4-t3="+t4.substract(t3)+" minutes");
    System.out.println("***");

    System.out.println("t4 before t3="+t4.isBefore(t3));
    System.out.println("t3 before t4="+t3.isBefore(t4));
    System.out.println("***");

    System.out.println("Copy Constructor t5 copy of t3");
    Time t5=new Time(t3);
    System.out.println("t5="+t5);
    System.out.println("***");

    System.out.println("Time Equality Test");
    System.out.println("t5 equals t3="+t5.equals(t3));
    System.out.println("***");

    //Event e1=new Event(t4, t3, "Exception Event");
    //System.out.println("Event e1="+e1);

    System.out.println("Event Created by t3 an t4");
    Event e2=new Event(t3,t4,"Object Oriented Assignment");
    System.out.println("Event e2="+e2);
    System.out.println("Duration of Event e2="+e2.getDuration());
    System.out.println("***");

    System.out.println("Class invariance violation Test");
    t3.setHour(4);
    t3.setMinute(30);
    t3.setMode(Time.PM);
    System.out.println("Test 1");
    System.out.println("Updated New t3="+t3);
    System.out.println("No change on Event e2="+e2);
    Time e2startTime=e2.getStart();
    e2startTime.setHour(11);
    e2startTime.setMinute(15);
    e2startTime.setMode(Time.AM);
    System.out.println("Test 2");
    System.out.println("Updated Time Get from Event Start="+e2startTime);
    System.out.println("No change on Event e2="+e2);
    System.out.println("***");

    Event e3=new Event(new Time(2,0,Time.PM),new Time(5,0,Time.PM),"Office Hours on Wednesday");
    System.out.println("Event e3="+e3);
    System.out.println("Duration of Event e3="+e3.getDuration());
    System.out.println("***");

    Event e4=new Event(new Time(11,0,Time.AM),new Time(1,0,Time.PM),"Lusnch Brreak");
    System.out.println("Event e4 Before Update="+e4);
    System.out.println("Duration of Event e4 Before Update="+e4.getDuration());
    System.out.println("***");

    System.out.println("Update Event e4 by Setters");
    e4.setStart(new Time(12,0,Time.PM));
    e4.setName("Lunch Break");
    System.out.println("Event e4 After Update by Getters Name="+e4.getName()+" Start="+e4.getStart()+" End="+e4.getEnd());
    System.out.println("Duration of Event e4 After Update="+e4.getDuration());
    System.out.println("***");

    Event e6=new Event(new Time(10,0,Time.AM),new Time(12,0,Time.PM),"Counter Strike Match");
    System.out.println("Event e6="+e6);
    System.out.println("***");

    System.out.println("e2 overlaps e3="+e2.isOverlapped(e3));
    System.out.println("e3 overlaps e4="+e3.isOverlapped(e4));
    System.out.println("e4 overlaps e6="+e4.isOverlapped(e6));
    System.out.println("***");

    Event e5=new Event(new Time(12,0,Time.PM),new Time(1,0,Time.PM),"Lunch Break");
    System.out.println("Event e5="+e5);
    System.out.println("***");

    System.out.println("Event Equality Test");
    System.out.println("e4 equals e5="+e4.equals(e5));
    System.out.println("e4 equals e3="+e4.equals(e3));

    Event e7 = new Event(e5);
    e7.setStart(new Time(12,30,Time.PM));
    System.out.println(e5);

    e5.setStart(new Time(2,0,Time.PM));


    }

    }




  • 5udrt mdtdt b



    < Bu mesaj bu kişi tarafından değiştirildi rob dö şambır -- 30 Nisan 2013; 16:13:43 >
  • Haklısın hocam..Adam Bilkent mezunu Amerika master-doktoralı falan çok kaliteli bi adam..Minnettar olcam uğraşabilirsen..Bu arada blogunuzu inceleme fırsatı buldum örneklerden zaman zaman yararlanabilirim faydalı bi çalışma olmuş elinize sağlık..Bide 23.45 de teslim etmem gerekiyo ödevi bilmiyorum ne derece müsaitsiniz ama..
  • 68rk/.



    < Bu mesaj bu kişi tarafından değiştirildi rob dö şambır -- 30 Nisan 2013; 16:15:09 >
  • Yapay Zeka’dan İlgili Konular
    ACİL YARDIM PDF.JS HATASI
    7 yıl önce açıldı
    Hocalar Acil Yardım !!
    3 yıl önce açıldı
    excel yardım
    11 yıl önce açıldı
    Daha Fazla Göster
  • hocam çok teşekkür ederim..Daha öncede yazmıştım ama yollayamadım..Son olarak ücret karşılığında da bu tarz şeyler yapıyomusunuz yoksa sadece yardım amaçlı mı yapıyorsunuz
  • p9d bn



    < Bu mesaj bu kişi tarafından değiştirildi rob dö şambır -- 30 Nisan 2013; 16:16:45 >
  • Kısa zamanda uygun fiyata java, c, c++ ödevleri yapılır.

    iletişim: javaodevi@hotmail.com
  • mail attım.
  • 
Sayfa: 1
- x
Bildirim
mesajınız kopyalandı (ctrl+v) yapıştırmak istediğiniz yere yapıştırabilirsiniz.