Find Jobs
Hire Freelancers

Fix this java code

$30-250 USD

Tamamlandı
İlan edilme: 9 yıldan fazla önce

$30-250 USD

Teslimde ödenir
I have the following assignment that I have worked on but I need fixed. Please only bid if you can complete this in about 1 hour from the time I award the project. Part I: Write a DoublyLinkedList Your list should contain inner classes private class Node and public class Iterator Your list should include the following routines: public void insert( AnyType data ) public void remove( AnyType data) public int size() public Iterator first() public Iterator last() public Iterator find(AnyType data) Your Iterator should include the following routines: public bool valid() public void next() public void prev() public AnyType getData() public void remove() // removes "current" from the list public void insert(AnyType data) // inserts after "current" My code is package linked_list; /** * @author adamb */ public class LinkedList<AnyType>{ public class ListNode { AnyType data; ListNode next; ListNode previous;//Make a previous to access the previous node. public ListNode(AnyType data, ListNode next, ListNode previous) {//Make three parameter method to access both the previous and the next node.(Doubly linked list) [login to view URL] = data; [login to view URL] = next; this.previous=previous;}}//Set the previous node as the object's previous node. ListNode header; ListNode footer;//Make footer to easily access to the last node. public LinkedList() { header = new ListNode(null, null, null); footer=new ListNode(null,null,null); } public void add(AnyType data) { [login to view URL] = new ListNode(data, [login to view URL], [login to view URL]);}////////////3 parameter method. public boolean remove(AnyType data) { ListNode current = [login to view URL]; current=[login to view URL];//////////////////// while (current != null && [login to view URL] != null && ![login to view URL](data)) current = [login to view URL]; if (current != null && [login to view URL] != null&&[login to view URL]!=null&&[login to view URL]!=null) { current.previous.next=[login to view URL]; current.next.previous=[login to view URL]; return true; } return false; } public ListIterator<AnyType> first() { return new ListIterator<AnyType>([login to view URL]);}//It is recursion method to iterate the process. public int size() { ListNode current = [login to view URL]; int s = 0; while (current != null) { s++; current = [login to view URL];} return s;} boolean contains(AnyType data) { ListIterator<AnyType> i = first(); while ([login to view URL]()) { if ([login to view URL]().equals(data)) return true; [login to view URL]();} return false;} public void replace (AnyType data1, AnyType data2) { ListNode current = [login to view URL]; while (current != null && ![login to view URL](data1)) current = [login to view URL]; if (current != null) [login to view URL] = data2;} public static class ListIterator<AnyType>{//Can access from main(), it must declared 'static'. It is because 'static' can access to 'static'. LinkedList<AnyType>.ListNode current; ListIterator(LinkedList<AnyType>.ListNode n) { [login to view URL] = n;} public boolean valid() { return current != null;} public AnyType Data() { if (current != null) return [login to view URL]; else return null;} public void next() { if (current != null) current = [login to view URL];}} public static void main(String args[]) { LinkedList<Integer> l = new LinkedList<Integer>();//Make an object. [login to view URL](new Integer(5)); [login to view URL](new Integer(55)); [login to view URL](new Integer(555)); [login to view URL](new Integer(55)); if ([login to view URL](new Integer(555))) [login to view URL]("yes"); else [login to view URL]("no"); [login to view URL](new Integer(5), new Integer(45)); ListIterator<Integer> iter = [login to view URL](); while ([login to view URL]()) { [login to view URL]([login to view URL]()); [login to view URL]();}}} And the result is yes 555 55 45 I can't remove the node.. I don't know what's wrong though.
Proje No: 6427975

Proje hakkında

10 teklif
Uzaktan proje
Son aktiviteden bu yana geçen zaman 10 yıl önce

Biraz para mı kazanmak istiyorsunuz?

Freelancer'da teklif vermenin faydaları

Bütçenizi ve zaman çerçevenizi belirleyin
Çalışmanız için ödeme alın
Teklifinizin ana hatlarını belirleyin
Kaydolmak ve işlere teklif vermek ücretsizdir
Seçilen:
Kullanıcı Avatarı
Hi, I am a professional Java programmer and I am sure that I can fix this code in less than an hour. Ready to start now. Would you like to give me this opportunity? Thanks
$30 USD 0 gün içinde
4,8 (30 değerlendirme)
4,6
4,6
10 freelancers are bidding on average $61 USD for this job
Kullanıcı Avatarı
hi mate this is asad, i have a lot of experience in java programming,would surely do it for you quick,cheers :)
$35 USD 0 gün içinde
4,9 (90 değerlendirme)
6,5
6,5
Kullanıcı Avatarı
Hi. I have required skills and experience in Java development. I am able to provide you with correct solution of DoublyLinkedList in about 1 hour. Feel free to contact me. Thank you for your consideration. Vitalii Oleksiv.
$30 USD 1 gün içinde
5,0 (37 değerlendirme)
5,8
5,8
Kullanıcı Avatarı
Already done, dude! Just pick me and I will tell you where your mistake. It's really simple for me....
$30 USD 1 gün içinde
5,0 (14 değerlendirme)
4,0
4,0
Kullanıcı Avatarı
can do it.........................................................................................................................
$66 USD 3 gün içinde
5,0 (4 değerlendirme)
3,2
3,2
Kullanıcı Avatarı
Hi gdlbt2, I've worked with you before, let me troubleshooting this bug and start to fix it right now for you. Thanks & Best Regards
$35 USD 0 gün içinde
4,8 (7 değerlendirme)
2,7
2,7
Kullanıcı Avatarı
Hello there, I have 3+ years development experience in data structures. Kindly contact for quality work as per your requirement in given time limits. Thank you Kind Regards Shadab Hussain
$122 USD 1 gün içinde
4,5 (3 değerlendirme)
1,3
1,3
Kullanıcı Avatarı
Dear hiring manager, I have read your job description very attentively. I have fully understood what you need to done.. We have a team of professionals.. I can work full time and have the ability to finish the project within the deadlines . I am interested in this job. I can give you 100% assurance of my work. Have a nice day..
$74 USD 0 gün içinde
0,0 (0 değerlendirme)
0,0
0,0
Kullanıcı Avatarı
I am SCJP, SCWCD, SCBCD certified developer with > 90% score in all. Have 6.5 + years of experience in Java/J2ee based enterprise applications. I think this is straightforward to solve.
$35 USD 1 gün içinde
0,0 (0 değerlendirme)
0,0
0,0

Müşteri hakkında

   UNITED STATES bayrağı
Salt Lake City, United States
5,0
21
Ödeme yöntemi onaylandı
May 2, 2014 tarihinden bu yana üye

Müşteri Doğrulaması

Teşekkürler! Ücretsiz kredinizi talep etmeniz için size bir bağlantı gönderdik.
E-postanız gönderilirken bir şeyler yanlış gitti. Lütfen tekrar deneyin.
Kayıtlı Kullanıcı İlan Edlien Toplam İş
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Ön izleme yükleniyor
Coğrafik konum için izin verildi.
Giriş oturumunuzun süresi doldu ve çıkış yaptınız. Lütfen tekrar giriş yapın.