Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For Desing Phase, upload a pdf or an image file that shows your flowchart. You can use any online tool to draw your solution. A

For Desing Phase, upload a pdf or an image file that shows your flowchart. You can use any online tool to draw your solution. A couple of them: https://www.lucidchart.com/pages/examples/flowchart-maker https://app.diagrams.net For Implementation Phase, upload your java file that has your coded solution.

image text in transcribed

image text in transcribed

compAlien: Genetics Simulation Consider an alien species life form called compAlien, whose genetic material is coded by three characters X'.'Y'.'2' 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: 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 offspringx. 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 o 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 lifecyde. Your program must have at least 6 methods (main, generateGeneticCode, calculate Health, findGender, and reproductionResult, etc.) COMP 111 PROJECTS FALL 2020 1/3 In your program - Ask user to citer the size of the population of compAlien species.... - Generate given number of individuals of compAlien species - Calculate their health and find their genders - Assign ID to cach pair starting from 1 Show the following options to the wer: 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 a user given number or higher, and add other interesting statistics (ie, 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 interesting Hint: During the development you can choose a smaller size for genetic code, eg 12, to trace and debug the program casier. You will use String class and create an array to generate the population. . Enter the side of complien population 73 ating computer species II. Tale Health ID:2. Tesla, Healtht 1 10: le match 3 ID?, ale, alth collen population la generated! Choose an options cate the ones (2Sandomly tent of comples Statistien (4) Your other option (5) Your other option-2 Enter an option. I Mating to comples Ester of that complean: 13 Entert of complient 28 pallen and 281 Mater na mate Choose an options Mete to compliens (2) Randomly rate a set of opene show statistics (4) Your other cotton (5) Tout other option-2 Enter aptit Matite compliana Enter ID of first compAlien: 1) Inter 10 of cind All len 1 and 2) Materapia chance 67. They have to fapie CAMILLE HALL Chant.lt (CORA (2) Randomly ate set of complex watatates You hartian (5) Tou the option- Enter an option 2 lating Randi complien Repeodation Intet er opin pain to reproduct Alien 1F and mate: Offspring chance 675. Results 1 Offspring Allen 2001 and in mate: Ortspring chance Sult: nopeing Asten II) te na te Altenant matet me te Choose an options: Rite to contiens (2) Sandaly nate et of comples Tout other option! (5 out other option-2 compten Population Statistics POATE population MALB population Enter an health threshold between and 12 not complet population have an eth et 12. het Ad other intersting Attracte Choose an options: Mate to contiens andaly nate set of complete Catatlatie Your other option-1 (Your other option compAlien: Genetics Simulation Consider an alien species life form called compAlien, whose genetic material is coded by three characters X'.'Y'.'2' 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: 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 offspringx. 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 o 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 lifecyde. Your program must have at least 6 methods (main, generateGeneticCode, calculate Health, findGender, and reproductionResult, etc.) COMP 111 PROJECTS FALL 2020 1/3 In your program - Ask user to citer the size of the population of compAlien species.... - Generate given number of individuals of compAlien species - Calculate their health and find their genders - Assign ID to cach pair starting from 1 Show the following options to the wer: 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 a user given number or higher, and add other interesting statistics (ie, 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 interesting Hint: During the development you can choose a smaller size for genetic code, eg 12, to trace and debug the program casier. You will use String class and create an array to generate the population. . Enter the side of complien population 73 ating computer species II. Tale Health ID:2. Tesla, Healtht 1 10: le match 3 ID?, ale, alth collen population la generated! Choose an options cate the ones (2Sandomly tent of comples Statistien (4) Your other option (5) Your other option-2 Enter an option. I Mating to comples Ester of that complean: 13 Entert of complient 28 pallen and 281 Mater na mate Choose an options Mete to compliens (2) Randomly rate a set of opene show statistics (4) Your other cotton (5) Tout other option-2 Enter aptit Matite compliana Enter ID of first compAlien: 1) Inter 10 of cind All len 1 and 2) Materapia chance 67. They have to fapie CAMILLE HALL Chant.lt (CORA (2) Randomly ate set of complex watatates You hartian (5) Tou the option- Enter an option 2 lating Randi complien Repeodation Intet er opin pain to reproduct Alien 1F and mate: Offspring chance 675. Results 1 Offspring Allen 2001 and in mate: Ortspring chance Sult: nopeing Asten II) te na te Altenant matet me te Choose an options: Rite to contiens (2) Sandaly nate et of comples Tout other option! (5 out other option-2 compten Population Statistics POATE population MALB population Enter an health threshold between and 12 not complet population have an eth et 12. het Ad other intersting Attracte Choose an options: Mate to contiens andaly nate set of complete Catatlatie Your other option-1 (Your other option

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Practical Neo4j

Authors: Gregory Jordan

1st Edition

1484200225, 9781484200223

More Books

Students also viewed these Databases questions

Question

Explain the process of MBO

Answered: 1 week ago