Vexus

Project 3.5

Oct 2nd, 2014
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.69 KB | None | 0 0
  1. package Battery;
  2.  
  3. public class Battery {
  4.        
  5.         public static void main(String[] args) {
  6.         Battery batt = new Battery();
  7.         batt.drain(amount);
  8.         batt.fill(amount);
  9.         batt.charge(amount);
  10.         System.out.println(charge);
  11.        
  12.         }
  13.         private static double charge;
  14.         private static double amount;
  15.        
  16.         private double charge(double amount) {
  17.                 amount = 3000;
  18.                 return charge;
  19.              
  20.         }
  21.         public void drain(double amount) {
  22.                 charge = amount - 300;
  23.         }
  24.         public void fill(double amount) {
  25.                 charge = amount + 300;
  26.         }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment