Şimdi Ara

Ucret karşılığı proje odevi Java

Daha Fazla
Bu Konudaki Kullanıcılar: Daha Az
2 Misafir - 2 Masaüstü
5 sn
6
Cevap
0
Favori
945
Tıklama
Daha Fazla
İstatistik
  • Konu İstatistikleri Yükleniyor
0 oy
Öne Çıkar
Sayfa: 1
Giriş
Mesaj
  • Öncelikle iyi günler.Data structure ödevim var ve java ile yazılcak.Böyle şeyler yapmayı kendime yakıştıramıyorum, hoşuma gitmez, projemi hep kendim yaparım ama konularda geriyim ve o yüzden yapamıyorum.Proje bittikten sonra yapan kişinin nerde ne yaptığını da not defterine yazmasını istiyorum. Sınıfımdaki arkadaşlar 2-3 saatte bitirmiş, zor değil sanırım. Javaya hakim biri sanırım 1-1,5 saate çok kolayca yapabilir. Ödev bugün gece 12'ye kadar yapılabilir. Ücreti lütfen çok uçuk tutmayalım, öğrenciyiz :( Projeyi kopyalıyorum... Cevabınızı bekliyorum.

    The Bag ADT

    Write an implementation for data structure Bag as a Java class, which is similar to a set, but it
    may contain several instances of the same member. For example, {'to', 'be', 'or', 'not', 'to', 'be'}
    is a bag of words, which is equal to {'be', 'be', 'not', 'or', 'to', 'to'} (since order of members is
    insignificant), but is unequal to {'be', 'not', 'or', 'to'} (since the number of instances is
    significant). Adding a member increases the number of instances in the bag by one and
    removing a member decreases the number of instances in the bag by one. The member is
    deleted from the bag when it has no instances.

    Think that “how would you represent a bag without actually storing multiple instances of the
    same member?” Your implementation should be efficient.

    Don’t forget that you cannot use any pre-written Java Api Class. You must write your own
    code for data structures (You are allowed to use lab source codes that we examined so far.)

    Your implementation must be generic, i.e. your bag can accept any type of instances. (Use
    Java Generics !)

    Your ADT should provide at least these operations:

     add(T item) : Inserts item in the bag.
     clear() : Removes all of the elements from this bag.
     contains(T item) : Returns true if this bag contains the specified element and false
    otherwise.
     distictSize() : Returns the distinct number of elements in this bag. (For example, for
    the bag {'to', 'be', 'or', 'not', 'to', 'be'} distinctSize is 4)
     elementSize(T item) : Returns the number of this item in this bag. (For example, for
    the bag {'to', 'be', 'or', 'not', 'to', 'be'} elementsize(‘be’) is 2)
     isEmpty() : Returns true if this collection contains no elements.
     remove(T item) : Removes a single instance of item from this bag and returns true if
    it is present; otherwise returns false.
     size() : Returns the total number of elements in this bag. (For example, for the bag
    {'to', 'be', 'or', 'not', 'to', 'be'} size is 6)
     toString() : Returns a string that displays the elements in the bag.

    Please write a Test program (a separate Java class) proves that your container(bag) works
    properly.

    P.S.: You can prepare your project yourself (single person) or as at most two people groups.
    You have to submit a report (very important !), and Java code (your classes) of your
    program. Please upload your compressed(zip/rar) file(that includes your report and Java code
    files) to the moodle page of the course to the appropriate area before 5 December 2016
    Thursday, 17:00.



    < Bu mesaj bu kişi tarafından değiştirildi m3rtcan -- 4 Aralık 2016; 13:24:0 >







  • quote:

    Think that “how would you represent a bag without actually storing multiple instances of the
    same member?” Your implementation should be efficient.


    Hash algoritması ile ağaç yapısı({'be', 'not', 'or', 'to'}) + hash dizisi( {'be', 'be', 'not', 'or', 'to', 'to'} ) lazım gibi.

    Böyle birşeyi daha önce yapmadım.

    Gene de böyle yapılırsa O(log(n)) erişim performansına sahip olabilir. Ekleme hızı da gene O(log(n)) olması lazım.

    Bi deniyim kendikendime.



    < Bu mesaj bu kişi tarafından değiştirildi Tugrul_512bit -- 4 Aralık 2016; 13:37:24 >
  • quote:

    Orijinalden alıntı: Tugrul_512bit

    quote:

    Think that “how would you represent a bag without actually storing multiple instances of the
    same member?” Your implementation should be efficient.


    Hash algoritması ile ağaç yapısı({'be', 'not', 'or', 'to'}) + hash dizisi( {'be', 'be', 'not', 'or', 'to', 'to'} ) lazım gibi.

    Böyle birşeyi daha önce yapmadım.

    Gene de böyle yapılırsa O(log(n)) erişim performansına sahip olabilir. Ekleme hızı da gene O(log(n)) olması lazım.

    Bi deniyim kendikendime.

    İlginiz için çok teşekkür ederim. Cevabınızı bekliyorum.
  • quote:

    Orijinalden alıntı: m3rtcan


    quote:

    Orijinalden alıntı: Tugrul_512bit

    quote:

    Think that “how would you represent a bag without actually storing multiple instances of the
    same member?” Your implementation should be efficient.


    Hash algoritması ile ağaç yapısı({'be', 'not', 'or', 'to'}) + hash dizisi( {'be', 'be', 'not', 'or', 'to', 'to'} ) lazım gibi.

    Böyle birşeyi daha önce yapmadım.

    Gene de böyle yapılırsa O(log(n)) erişim performansına sahip olabilir. Ekleme hızı da gene O(log(n)) olması lazım.

    Bi deniyim kendikendime.

    İlginiz için çok teşekkür ederim. Cevabınızı bekliyorum.

    Sanırım oldu, şimdi benchmark yapıyorum ram + hız için.




  • quote:

    Orijinalden alıntı: m3rtcan


    quote:

    Orijinalden alıntı: Tugrul_512bit

    quote:

    Think that “how would you represent a bag without actually storing multiple instances of the
    same member?” Your implementation should be efficient.


    Hash algoritması ile ağaç yapısı({'be', 'not', 'or', 'to'}) + hash dizisi( {'be', 'be', 'not', 'or', 'to', 'to'} ) lazım gibi.

    Böyle birşeyi daha önce yapmadım.

    Gene de böyle yapılırsa O(log(n)) erişim performansına sahip olabilir. Ekleme hızı da gene O(log(n)) olması lazım.

    Bi deniyim kendikendime.

    İlginiz için çok teşekkür ederim. Cevabınızı bekliyorum.

    Hatalar varmış, bissürü de iş çıkardılar son birkaç saattir, onlarla uğraşmak zorunda kaldım. Başkası yapsa iyi olacak.




  • Eğer aynı tipte objeyi ayrı ayrı saklayamıyorsak nasıl erişeceğiz özelliklerine? Mesela 2 öğrenci objesi oluşturdum isimleri vs farklı fakat bunları ayrı ayrı saklamadan 2.eklediğimiz öğrencinin ismine oluşmak biraz garip geldi. Aklıma başka bir fikir olarak Liste içinde Liste oluşturmak geliyor.
  • 
Sayfa: 1
- x
Bildirim
mesajınız kopyalandı (ctrl+v) yapıştırmak istediğiniz yere yapıştırabilirsiniz.