public class Calculator { FormatRubles rub = new FormatRubles(); float bill = 0.00f; //СУÐÐÐ float sum(float y) { bill = bill + y; String billFormat = "СУÐÐÐ: %.2f %s"; System.out.println(String.format(billFormat, bill, rub.Rubles(bill))); return bill; } //ÐÐÐÐÐÐÐ void calculate(float sum, int numberOfPeople) { float result = (float) sum / numberOfPeople; String resultFormat = "ÐаждÑй из %d лÑдей - заплаÑÐ¸Ñ %.2f %s"; String resultOutcome = String.format(resultFormat, numberOfPeople, result, rub.Rubles(result)); System.out.println(resultOutcome); } }