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 796671
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T22:40:34+00:00 2026-05-14T22:40:34+00:00

I am adding a feature to my program in which the user will have

  • 0

I am adding a feature to my program in which the user will have the ability to change their unit of measurement at any time, and have the program recalculate their input and output.

If the user inputs say, 20lbs for an item, then decides he wants to work in kilograms instead, he can select an option to do so at any time, and the program will recalculate his 20lb input to 9Kg. Then if he decides he’d rather work in ounces, it would convert that 9Kg to 320oz, so on and so forth.

What would be the most effective and efficient way to go about this? I’ve been racking my brain trying to figure out a way to have the correct formula be implemented.

  • 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-14T22:40:35+00:00Added an answer on May 14, 2026 at 10:40 pm

    Do all your calculations in standard units (or the units you prefer to work with).

    • Convert the user’s input from whatever they wish into standard units.
    • Perform the calculation using standard units.
    • Convert the answer back into the units the user wants.

    Only the user interface needs to care about the unit conversions. The rest of the code does not need to worry about it.

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

Sidebar

Related Questions

I'm adding a feature to an existing script that will allow the user to
i am working on one application which requires the feature of adding the custom
I am creating an application. I have to implement a bookmark feature, and adding
I am adding a small feature in a program that uses access 97 db.
I was adding a loading bar feature to my program in Java and I
I'm interested in adding a Google Maps feature to a program I'm writing. I
I'm adding a new feature to my user module for my CMS and I've
I am adding a feature to edit the ads a user puts. For that
I am adding a feature to my current project that will allow network admins
I am doing some significant refactoring and feature-adding on a project, and have just

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.