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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T04:09:21+00:00 2026-06-03T04:09:21+00:00

I have four variable in a program: xPos, yPos, xVel, yVel Each one of

  • 0

I have four variable in a program: xPos, yPos, xVel, yVel

Each one of them should have a setter/getter, but it will be awkward to say:

setXpos()
getXpos()
getXvel()
setXvel()

Is there a naming convention for these variables that is short and efficient?

  • 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-06-03T04:09:22+00:00Added an answer on June 3, 2026 at 4:09 am

    What you’ve listed in your code snippet is the naming convention.

    The more important question is, how can they be reframed for readability? As someone who hasn’t seen your program, the four functions you listed seem perfectly clear to me. I’m having a hard time coming up with something clearer.

    Any time you abandon a convention, even if the convention makes things icky, you lose readability/clarity (as people expect those conventions to be fulfilled). You have to weigh the advantage of abandoning an icky convention-result for something better against that loss of abandoning the convention.

    All this to say, you have my permission to use ‘getXvel()’. Godspeed. =)

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

Sidebar

Related Questions

I have lists of variable length where each item can be one of four
I have a variable number of points on a canvas. Sometime its four other
I have four UINavigationControllers assigned each to a tab in a UITabBarController. Each UINavigationController
I have four models that are related to one another, the way I have
Possible Duplicate: C# string formatting and padding In my C# program, I have four
I have a variable that needs the first four lines stripped out before being
I have four checkboxes in my form. I have string variable called CheckedString. If
I have four classes which share some arrangement of four properties. I have currently
I have four different lists. headers , descriptions , short_descriptions and misc . I
I have four integer numbers a, b, c, d, and integer x ϵ [1,

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.