Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Β© A+ Computer Science - www.apluscompsci.com
- //Name - Chris Clemente
- //Date - 10-13-2016
- //Class - Comp Sci
- //Lab -
- public class Average
- {
- //instance variables
- private double one, two, average;
- public void setNums(double num1, double num2)
- {
- one = num1;
- two = num2;
- }
- public void average( )
- {
- average=((one + two) / 2);
- }
- public void print( )
- {
- System.out.println( one + " + " + two +" has an average of " + average);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement