Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package javaclassproject;
- /**
- *
- * @author storn
- */
- public class FirstClass {
- public String StoreName;
- public int BoxPrice;
- public int OneBoxArea;
- FirstClass(String storeName, int boxPrice, int oneBoxArea){
- StoreName = storeName;
- BoxPrice = boxPrice;
- OneBoxArea = oneBoxArea;
- }
- public static int CostWithoutDelivery(int price, int area){
- int neededBoxes = 108/area;
- int procent = (neededBoxes * 15) / 100;
- int cost = price * (neededBoxes + procent);
- return cost;
- }
- public static void ShowResult(int result){
- System.out.println("С вас " + result + " рублей");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement