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

  • Home
  • SEARCH
  • 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 6941385
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T12:52:43+00:00 2026-05-27T12:52:43+00:00

Okay, so I have an assignment to code (using Java,but I don’t think that

  • 0

Okay, so I have an assignment to code (using Java,but I don’t think that matters) a simulation / model of inheritance as in the Biology sense, not OOP , i.e you know, father with brown eye / hair, mom with black eye / hair etc. thing.

I am facing two difficulties, firstly how do I start? I’ve never programmed a simulation before and don’t know a thing about it. I considered that since I am using Java, I might as well use applets, rather than an offline simulation, but anyway, is there some sort of tutorial or guide, or explanation anywhere on how to code simple graphical simulations?

Secondly, is there any existing simulation (with or without source code) of biological inheritance? It will give me an idea on what exactly I should make, and if the source is available, it may prove very helpful.

In short

Q-1 How exactly do you program graphical simulations?

and

Q-2 Are there any existing simulations of biological inheritance on the internet?

  • 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-27T12:52:44+00:00Added an answer on May 27, 2026 at 12:52 pm

    Here is my guess on how to solve your problem.

    Have a list of organisms that represent all of the possible organisms at the current generation.

    Each organism stores its genetic makeup. You do not need backwards references to the parent organisms(you do not care about previous generations).

    Then when the user selects their chosen pair, clear the list and generate a new list with those two organisms, with each possible combination of genes.

    Then draw the list on the screen, and allow the user to select two more.

    EDIT

    Also, here is a random idea of how to generete your gametes for an arbitrary size.
    Binary numbers slowly cycle through all 0’s and 1’s. So, if you went from 0 to 7, you would go through every combination of 000 to 111. Thus you can think of a 0 as being the left allele, and a 1 as being the right allele(for example, the number 5, with the representation 101 would mean a gamete of AbC for the genotype aAbBcC) . Therefore you can generate every possible allele combination when you go from 0 to 2^(numOfAlleles-1) (inclusive). This would require bit shifting to detect which bits are set.

    The rest would simply be a punnet square.

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

Sidebar

Related Questions

Okay I have updated my code a little, but I am still not exactly
Okay I have the below code performing something I don't want it to do.
Okay I have a project that is using the android-rss library (org.mcsoxford.rss). I created
Okay I have a large CRUD app that uses tabs with Forms embedded in
Okay I have updated my code quite a bit. I am getting a new
Okay i have two models: posts and comments. as you can think comments has
Okay so I have the following Code which appends a string to another in
Okay so I have a scenario similar to the below code, I have a
Okay so i have a semi weridish problem with re.sub. Take the following code:
So I have this code in python that writes some values to a Dictionary

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.