SHARE
TWEET

1st_class

stornup Jan 19th, 2020 122 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2.  * To change this license header, choose License Headers in Project Properties.
  3.  * To change this template file, choose Tools | Templates
  4.  * and open the template in the editor.
  5.  */
  6. package javaclassproject;
  7.  
  8. /**
  9.  *
  10.  * @author storn
  11.  */
  12. public class FirstClass {
  13.     public String StoreName;
  14.     public int BoxPrice;
  15.     public int OneBoxArea;
  16.    
  17.     FirstClass(String storeName, int boxPrice, int oneBoxArea){
  18.         StoreName = storeName;
  19.         BoxPrice = boxPrice;
  20.         OneBoxArea = oneBoxArea;
  21.     }
  22.    
  23.     public static int CostWithoutDelivery(int price, int area){
  24.         int neededBoxes = 108/area;
  25.         int procent = (neededBoxes * 15) / 100;
  26.         int cost = price * (neededBoxes + procent);
  27.         return cost;
  28.     }
  29.    
  30.     public static void ShowResult(int result){
  31.         System.out.println("С вас " + result + " рублей");
  32.     }
  33. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top