Find Jobs
Hire Freelancers

java - data structure assignment

$10-30 USD

Ολοκληρώθηκε
Αναρτήθηκε πάνω από 6 χρόνια πριν

$10-30 USD

Πληρωμή κατά την παράδοση
Background Integer.MAX_VALUE is the maximum value of a Java int: 2147483647. If you want to work with even bigger integers, you have the option of using the type long, which has the maximum value of Long.MAX_VALUE = 9223372036854775807. But what if you this is not enough? What if you are working on something like an astronomy application, and need to keep track of things such as number of stars in the universe? This is of the order of 1023, larger than the maximum long value. For situations like this, you need to be able to work with an integer type that can hold arbitrarily large or small positive and negative values, with any number of digits. There is no built-in type in the language for this, so you need to craft your own. In this assignment, you will do exactly this, by implementing a class called BigInteger, with a representative small set of operations. The trick is to store an integer as a linked list of digits. For example, the integer 754 will be stored as: 4 -> 5 -> 7 Why are the digits stored backward? It's because computations such as adding or multiplying big integers are easier to do if the linked list stores digits in ascending order of positional value. So the least significant digit is in the first node of the linked list, and the most significant digit is in the last node. This is a simple linked list, NOT circular, with a front pointer. The sign (positive or negative), is stored separately in a boolean field. Also, there can never be zeros at the end of the list. Such zeros will be insignificant (appearing before the most significant digit in the number) as in 00754. Implementation and Point Assignment Download the attached [login to view URL] file to your computer. DO NOT unzip it. Instead, follow the instructions on the Eclipse page under the section "Importing a Zipped Project into Eclipse" to get the entire project into your Eclipse workspace. You will see a project called BigInteger with classes BigInteger, DigitNode, and BigTest in package math. The DigitNode class implements the linked list node that will hold a digit of a big integer linked list. You need to fill in the implementation of the following methods in the BigInteger class: Method Points parse 10 add 30 multiply 25 Note: When parsing an input string as an integer, you can use the [login to view URL](char) method to tell if a character is a digit. Make sure to read the comments that precede classes, fields, and methods for code-specific details that do not appear here. Observe the following rules while working on [login to view URL]: Running/Testing Use the class BigTest to test your implementation. Carefully read the code in the file to get a good idea of how the BigInteger methods are used. Here's a sample run of BigTest: (p)arse, (a)dd, (m)ultiply, or (q)uit? => p Enter integer => 125 Value = 125 (p)arse, (a)dd, (m)ultiply, or (q)uit? => p Enter integer => -126 Value = -126 (p)arse, (a)dd, (m)ultiply, or (q)uit? => p Enter integer => +1 Value = 1 (p)arse, (a)dd, (m)ultiply, or (q)uit? => p Enter integer => 005 Value = 5 (p)arse, (a)dd, (m)ultiply, or (q)uit? => p Enter integer => 123xy56 Incorrect Format (p)arse, (a)dd, (m)ultiply, or (q)uit? => a Enter first integer => 12 Enter second integer => -13 Sum: -1 (p)arse, (a)dd, (m)ultiply, or (q)uit? => a Enter first integer => 16756726 Enter second integer => 0 Sum: 16756726 (p)arse, (a)dd, (m)ultiply, or (q)uit? => m Enter first integer => 12 Enter second integer => 200 Product: 2400 (p)arse, (a)dd, (m)ultiply, or (q)uit? => m Enter first integer => 178 Enter second integer => -156 Product: -27768 (p)arse, (a)dd, (m)ultiply, or (q)uit? => m Enter first integer => -16 Enter second integer => -05 Product: 80
Ταυτότητα εργασίας: 15186770

Σχετικά με την εργασία

10 προτάσεις
Απομακρυσμένη Εργασία
Ενεργός/ή 7 χρόνια πριν

Ψάχνεις τρόπο για να κερδίσεις μερικά χρήματα;

Πλεονεκτήματα πλειοδοσίας στο Freelancer

Καθόρισε τον προϋπολογισμό σου και το χρονοδιάγραμμα
Πληρώσου για τη δουλειά σου
Περίγραψε την πρόταση σου
Η εγγραφή και η πλειοδοσία σε εργασίες είναι δωρεάν
Βραβεύτηκε στον/στην:
Avatar Χρήστη
Hello Sir i have read your description and checked attached file and i am confident that i can do this project perfectly. please kindly inbox me for more thanks Relevant Skills and Experience Java, Data structure = 8+ years Proposed Milestones $30 USD - m
$30 USD σε 1 ημέρα
4,9 (348 αξιολογήσεις)
7,5
7,5
10 freelancers δίνουν μια μέση προσφορά $50 USD για αυτή τη δουλειά
Avatar Χρήστη
hello, i have a lot of experience with java. i can do this big integer project. we can discuss in chat. thanks Relevant Skills and Experience java Proposed Milestones $60 USD - all
$60 USD σε 1 ημέρα
4,9 (319 αξιολογήσεις)
7,2
7,2
Avatar Χρήστη
A proposal has not yet been provided
$30 USD σε 3 ημέρες
4,9 (60 αξιολογήσεις)
5,4
5,4
Avatar Χρήστη
Hi Relevant Skills and Experience I am good in java Proposed Milestones $111 USD - So I hope your reply.
$111 USD σε 1 ημέρα
4,9 (20 αξιολογήσεις)
4,8
4,8
Avatar Χρήστη
Why you should hire me? Professional project management & experts in managing projects remotely Security coding standard Ability to work in your time zone 24/7/365 availability Relevant Skills and Experience 7 years experience in PHP, MYSQL, CSS3, HTML5 and deep knowledge Wordpress, pluggin, development issues and customization. In addition, I have a solid expertise in the 3rd party API Proposed Milestones $25 USD - Final
$25 USD σε 1 ημέρα
4,8 (5 αξιολογήσεις)
2,8
2,8
Avatar Χρήστη
Hello, how are you? I hope you have a bright day/evening from your side. I have read the details provided, but please contact me so that we can discuss more on the project. Relevant Skills and Experience Computer Science, Java Proposed Milestones $126 USD - .
$126 USD σε 1 ημέρα
2,7 (10 αξιολογήσεις)
4,6
4,6
Avatar Χρήστη
Hey ... I have read ur project .. I think it's just an easy job I can do for you Relevant Skills and Experience I have been working with java and algorithms and data structure for years ... pls leave me a message if u wanna hire me Proposed Milestones $25 USD - Data structure project
$25 USD σε 1 ημέρα
5,0 (4 αξιολογήσεις)
2,5
2,5
Avatar Χρήστη
. Relevant Skills and Experience . Proposed Milestones $25 USD - . .
$25 USD σε 1 ημέρα
4,5 (6 αξιολογήσεις)
1,7
1,7
Avatar Χρήστη
Hey Its an assignment. I can do it as soon as possible. Relevant Skills and Experience C,C++, Java, Algorithm, Active coder in programming competition sites like TopCoder, Spoj etc I have good knowledge of DS & Algorithm. Proposed Milestones $5 USD - before $10 USD - after
$15 USD σε 1 ημέρα
0,0 (0 αξιολογήσεις)
0,0
0,0

Σχετικά με τον πελάτη

Σημαία της UNITED STATES
New Brunswick, United States
5,0
31
Επαληθευμένη μέθοδος πληρωμής
Μέλος από Ιουν 24, 2017

Επαλήθευση Πελάτη

Ευχαριστούμε! Σου έχουμε στείλει ένα email με ένα σύνδεσμο για να διεκδικήσεις τη δωρεάν πίστωση σου.
Κάτι πήγε στραβά κατά την προσπάθεια αποστολής του email σου. Παρακαλούμε δοκίμασε ξανά.
Εγγεγραμμένοι Χρήστες Συνολικές Αναρτημένες Δουλειές
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Φόρτωση προεπισκόπησης
Δόθηκε πρόσβαση για Geolocation.
Η σύνδεση σου έχει λήξει και τώρα έχεις αποσυνδεθεί. Παρακαλούμε συνδέσου ξανά.