User Profile

Collapse

Profile Sidebar

Collapse
JimmyJava694
JimmyJava694
Last Activity: Oct 14 '07, 10:08 PM
Joined: Oct 13 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Is there any way this can be implemented with the code I have currently?

    [PHP]import java.util.Scann er;
    import java.util.Rando m;
    public class Mutate
    {
    public static void main(String[]args)
    {
    String choices = "ACGT", input = "", output = "";
    Random generator = new Random(37359285 59L);
    Scanner scan = new Scanner(System. in);
    System.out.prin tln("Please...
    See more | Go to post

    Leave a comment:


  • Is this the only way to do this?

    The program needs to do the following (n) times
    - Picks a random position in the String
    - Changes the letter in that position to one of A, C, G, and T, selected at random. Note that it is possible for the letter to stay the same (for example, A is randomly selected as the new letter for a position which the letter was already A)

    Once the n mutations have been applied to...
    See more | Go to post

    Leave a comment:


  • My code now is this.. thanks!

    [PHP]import java.util.Scann er;
    import java.util.Rando m;
    public class Mutation
    {
    public static void main(String[]args)
    {

    Random generator = new Random(37359285 59L);
    Scanner scan = new Scanner(System. in);
    System.out.prin tln("Please choose a number:");
    int number = scan.nextInt();

    double r = generator.nextD ouble();...
    See more | Go to post

    Leave a comment:


  • By the way, arrays cannot be implemented as I'm in Java basics
    i.e (They have not been taught; cannot be used).
    See more | Go to post

    Leave a comment:


  • Hmm, , but can't I create a new String which consists of the character(s) in the old String, with the character to be mutated replaced by the mutated character?

    My code is:

    [PHP]import java.util.Scann er;
    import java.util.Rando m;
    public class Mutation
    {
    public static void main(String[]args)
    {

    Random rand = new Random(37359285 59L);
    Scanner scan =...
    See more | Go to post

    Leave a comment:


  • How to mutate a String with certain random values?

    Hey everyone,

    I need help trying to mutate a String.

    For example.. I ask the person to input a number.
    Then I ask them to input a String.
    (The string they input can be any length, but must consist of only letters (A,C,G, or T)

    The number they input is the amount of 'random' implications applied to that String.. and replaces a letter in a random position with either (A,C,G, or T)
    ...
    See more | Go to post
No activity results to display
Show More
Working...