Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please answer it with java compAlien: Genetics Simulation Consider an alien species (life form) called compAlien, whose genetic material is coded by three characters: 'X','Y','Z'.
Please answer it with java
compAlien: Genetics Simulation Consider an alien species (life form) called compAlien, whose genetic material is coded by three characters: 'X','Y','Z'. An individual of this species has a code length of 128 and made up of these three characters. A compAlien may have the following genetic code having length of 128 characters: x x x z z There are certain properties of this species, which can be identified by analyzing the genetic code: - Health: An individual's health is proportional to the number of distinct YXZ sequences in its code. Health affects the individual's chance of producing offsprings. - Gender: gender is determined by the last (128th) character: males have 'Y'; females have 'X' or 'Z' on their code as the last character. - Reproduction: When two individuals of opposite gender mate, they can produce an offspring with a probability proportional to the sum of their healths. The probability of having an offspring for two opposite gender individuals X and Y is formulated as follows: p_reproduce = (Health_X + Health_Y) / N Experiment on N to find an appropriate value for reproduction probability. Remember a probability can be 0 and 1 and can be represented as a percentage. Your task in this project is to write a main program and related methods to simulate the above described compAlien species and it lifecycle. Your program must have at least 6 methods (main, generateGeneticCode, calculate Health, findGender, and reproduction Result, etc.) COMP 111 PROJECT 3 FALL 2020 1/3 In your program - Ask user to enter the size of the population of compAlien species ... - Generate given number of individuals of compAlien species - Calculate their healths and find their genders - Assign ID to each pair starting from 1 - Show the following options to the user: Mate two compAliens: user can enter the IDs of two compAliens to mate them. Show the result of reproduction. Randomly enlarge population: ask user to enter number of randomly chosen compAlien pairs and simulate their reproduction. Calculate statistics: find number of females and males, find number of compAliens having health of H (a user given number) or higher, and add other interesting statistics (i.e. some specific gene orders may represent some illnesses, some genes at specific locations can represent some physical characteristics such as eye color, hair color etc.). You are free to add other properties (at least two more operations) in order to make your program more interestingStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started