Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6567989
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T14:24:07+00:00 2026-05-25T14:24:07+00:00

In my class I have an assignment to create a Number class, which has

  • 0

In my class I have an assignment to create a Number class, which has operations for arithmetic. (Add/subtract/multiply/etc.)

There is one part I am confused about – the doubly-linked lists. The only part of the spec that discusses it I find a little confusing. I don’t know what I’m supposed to be storing – all numbers entered? It says high points to the high-order digit’s node…I don’t know what that means. Also, I’m not sure exactly how I would implement the doubly-linked list…just have a reference to the next ‘high-order digit’?

ALSO – What is Node? The assignment only says I am to create the class Number…but Node in the Java API says it is something to do with HTML tags? Shouldn’t I use Number low, high???

Here is the part of the spec detailing the doubly-linked list part:

Numbers will be stored in doubly-linked lists (do not use generics here). Each node will
have an int value field which will hold one digit (0 through 9) and two pointer fields,
prev and next.

The Number class will have five fields: 

private Node low, high;
private int digitCount = 0;
private int decimalPlaces = 0;
private boolean negative = false;

high points to the high-order digit’s node, low points to the
low-order digit’s node,
digitCount is the number of digits stored in the list,
decimalPlaces is the number of digits (nodes)
after the decimal place and negative gives the sign.

I am not asking for an exact solution, just some guidance and understanding. I truly appreciate any help given.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T14:24:07+00:00Added an answer on May 25, 2026 at 2:24 pm

    A Node in this context is an element of your linked list.

    It seems like you are supposed to represent a Number as a linked list, where each Node contains one digit..

    So the number

    12.34

    will have 4 nodes in it, one for each of 1, 2, 3, and 4. Your Number will have digitCount of 2 and decimalPlaces of 2 since there are 2 digits each before and after the decimal.

    Your linked list should look like

    1 <-> 2 <-> 3 <-> 4

    where <-> represents the doubly linked nature of the linked list (pointers for both previous and next node.) There should probably be pointers from 1 <-> 4 as well, if the list is supposed to be circular.

    The outline of your Number class would look like

    public class MyNumber {
       DigitNode low;
       DigitNode high;
       int digitCount;
       int decimalPlaces;
       bool negative;
    }
    

    your DigitNode class outline would look like

    public class DigitNode {
       int digit;
       DigitNode next;
       DigitNode prev;
    }
    

    im ignoring things like private/protected and things like setters/getters. You can now do something like iterate over the digits by getting the low property, getting its ‘next’ property, and looping until next is null.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an assignment from my programming class, which is very poorly worded... The
Have a homework assignment in which I'm supposed to create a vector of pointers
I have a class that has no default constructor or assignment operator so it
I have an assignment in a language-independent class, and part of it is using
I have to do an assignment for my class and it says not to
As part of the last assignment in a beginner python programing class, I have
I want to have a base class which dictates the alignment of the objects
Is there a way to require that a class have a particular abstract member?
I am having trouble with an assignment. I have a class called Grid and
I have a class with a member which is not changed by the methods

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.