ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 103 Weeks Ago, 2 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 06 Jun 2017 My Price 9.00

public class ComputerMicrobe

The purpose of this assignment is use method-chaining and write by specification in OOP.

I have a some of it done but i'm getting the wrong output every time,

Below is the what i have done, and attached is what it need to look like.



public class ComputerMicrobe
{
public String name; // Instance variable for name of the Computer Microbe
public String dNACode; // Instance variable to hold the number of Computer Microbe
private String reverse;

@Override
public String toString()
{
return name; //ToString so as to ignore hashvalues result in output
}
public ComputerMicrobe(String name, String dNACode)
{
this.setName(name); //set name
this.setDNACode(dNACode); //set dNACode
}
public void setName(String name)
{
this.name = name;
}
public void setDNACode(String dNACode)
{
this.dNACode = dNACode;
}
public ComputerMicrobe reverse()
{
String reverse = new StringBuffer(dNACode).
reverse().toString();
System.out.println(reverse); //reverse output
return this;
}
ComputerMicrobe reproduce(ComputerMicrobe b)
{
return null;
}
void mutate(ComputerMicrobe a)
{
}
}

 

You must create two Java files. One is called LastNameFirstNameWeek7Prog.java, andthe other is called  ComputerMicrobe.java.Ensure you include ALL the java files required to make your program compile and run. I would like to see your .java files only.)Proper coding conventions required the first letter of the class start with a capital letter and the first letter of each additional word start with a capital letter. Only submit the .java files needed to make the program run. Do not submit the .class file or any other file. 5%Style ComponentsInclude properly formatted prologue, comments, indenting, and other styleelements as shown in Chapter 2 starting page 64 and Appendix 5 page 881-892.5%LastNameFirstNameWeek7Prog.javaWrite a driver class that uses the ComputerMicrobe class. This driver class will use the main method provided below exactly. You must copy it and not change it. Any change in the main method will incur in deducted points.public static void main (String[] args){      Scanner stdIn = new Scanner(System.in);      String name;    //Auxiliar ComputerMicrobe name      String dNACode;   //Auxiliar ComputerMicrobe DNA Code      ComputerMicrobe a, b, c; // ComputerMicrobe objects      System.out.println("Enter name of first ComputerMicrobe");      name = stdIn.next();      System.out.println("Enter DNA Code for first ComputerMicrobe");      dNACode = stdIn.next();      a = new ComputerMicrobe(name, dNACode);      System.out.println("Enter name of second ComputerMicrobe");      name = stdIn.next();      System.out.println("Enter DNA Code for second ComputerMicrobe");      dNACode = stdIn.next();      b = new ComputerMicrobe(name, dNACode);30%

Attachments:

Answers

(11)
Status NEW Posted 06 Jun 2017 05:06 AM My Price 9.00

-----------

Attachments

file 1496725853-Solutions file 2.docx preview (51 words )
H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly -----------onl-----------ine----------- an-----------d g-----------ive----------- yo-----------u e-----------xac-----------t f-----------ile----------- an-----------d t-----------he -----------sam-----------e f-----------ile----------- is----------- al-----------so -----------sen-----------t t-----------o y-----------our----------- em-----------ail----------- th-----------at -----------is -----------reg-----------ist-----------ere-----------d o-----------n -----------THI-----------S W-----------EBS-----------ITE-----------. ----------- Th-----------ank----------- yo-----------u -----------
Not Rated(0)