For each program, submit two items in the Week 6 Dropbox:

Don't use plagiarized sources. Get Your Custom Essay on
Get a PLAGIARISM-FREE custom essay written for you!
Order Essay
  • The program code (the .java file)
  • The program’s output (a screen print of the results of the program’s execution)

For each program, include a prolog that contains:

  • The name of the program (the name of the .java file)
  • Your name
  • The Week number and Assignment number of the program



1. Create the Mouse program (Figures 6.4 and 6.5 in your textbook).  Test it with interesting data.


2. Modify the MouseDriver program you just created in Exercise #1.  Currently, it uses the same value of growthRate for both mice.  Change the program so it accepts a different value of growthRate for each mouse.  Test it with different growth rates for the two mice.


3. Modify the MouseDriver program you just created in Exercise #2.  Currently, it creates two mice.  Create three mice.  Use interesting names for the mice (instead “gus” and “jaq”).


4. Change the Mouse program you just created in Exercise #3.  Instead of Mouse, use Tree.  Instead of MouseDriver, use TreeDriver.  Instead of days, useyears.  Instead of weight, use height.  Instead of the names of three mice, use the names of three tress, like fig and date and sequoia.  Make the sequoia tree really, really tall.  Remember to make appropriate changes to the print instruction.  Test it with interesting data.


5.  Create a driver program that works with the following BankAccount class: 




* This class stores and prints information for a bank account.



public class BankAccount 


  private String customer;  // customer’s name

  private int accountNum;   // bank account number


// This method stores a customer’s information:

  public void setCustomer(String customer)


    this.customer = customer;



// This method stores an account’s number:

  public void setAccountNum(int accountNum)


    this.accountNum = accountNum;



// This method prints a bank account’s information.

  public void printAccountInfo()



      this.customer + “‘s account number is ” + this.accountNum + “.”);


} // end class BankAccount


Test the program with interesting data for customer name and account number.


6. Get the CircleDriver program from the brilliant PowerPoint lecture to work with the Circle class.  Test it with interesting data.


7. Create the Mouse2 program (Figures 6.13 and 6.14 in your textbook).  Test it with interesting data.




Extra Credit:


1. When a method tries to return a double, and the method call is expecting anint, the program won’t compile.  Remember the Russian dolls?  A double won’t fit in an int.


What happens when a method tries to return an int, and the method call is expecting a double?  It should work, right?  Modify the Mouse2Driver program and the Mouse2 class to find out!




2. Start with the Mouse2 and Mouse2Driver programs.  Add a method that will copy the contents of one mouse into another mouse.  Add a method to print all three variables.  Then print the values of the variables in both mice to show they’re the same.

Homework Paper
Calculate your paper price
Pages (550 words)
Approximate price: -

Our Advantages

Plagiarism Free Papers

All our papers are original and written from scratch. We will email you a plagiarism report alongside your completed paper once done.

Free Revisions

All papers are submitted ahead of time. We do this to allow you time to point out any area you would need revision on, and help you for free.

Free Title-page

A title page preceeds all your paper content. Here, you put all your personal information and this we give out for free.

Free Bibliography

Without a reference/bibliography page, any academic paper is incomplete and doesnt qualify for grading. We also offer this for free.

Originality & Security

At Homework Sharks, we take confidentiality seriously and all your personal information is stored safely and do not share it with third parties for any reasons whatsoever. Our work is original and we send plagiarism reports alongside every paper.

24/7 Customer Support

Our agents are online 24/7. Feel free to contact us through email or talk to our live agents.

Try it now!

Calculate the price of your order

We'll send you the first draft for approval by at
Total price:

How it works?

Follow these simple steps to get your paper done

Place your order

Fill in the order form and provide all details of your assignment.

Proceed with the payment

Choose the payment system that suits you most.

Receive the final file

Once your paper is ready, we will email it to you.

Our Services

We work around the clock to see best customer experience.


Flexible Pricing

Our prces are pocket friendly and you can do partial payments. When that is not enough, we have a free enquiry service.


Admission help & Client-Writer Contact

When you need to elaborate something further to your writer, we provide that button.


Paper Submission

We take deadlines seriously and our papers are submitted ahead of time. We are happy to assist you in case of any adjustments needed.


Customer Feedback

Your feedback, good or bad is of great concern to us and we take it very seriously. We are, therefore, constantly adjusting our policies to ensure best customer/writer experience.