Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package bikeshop;
- public class obj {
- private int Order_Time;
- private boolean Order_Tip;
- public int Price;
- public obj(int Order_Time, boolean Order_Tip){
- this.Order_Time = Order_Time;
- this.Order_Tip = Order_Tip;
- }
- // public int calcTime( int orderAge){
- // Order_Time = orderAge;
- // return Order_Time;
- //
- // }
- public int calcTip( boolean orderType){
- this.Order_Tip = orderType;
- if(orderType){
- this.Price=12;
- }else{
- this.Price =15;
- }
- return this.Price;
- }
- public void vypis(){
- System.out.println(" Price is " + this.Price);
- }
- //**************************************************************
- //********************Getter\Setter*****************************
- public int getOrder_Time() {
- return Order_Time;
- }
- public void setOrder_Time(int Order_Time) {
- this.Order_Time = Order_Time;
- }
- public boolean isOrder_Tip() {
- return Order_Tip;
- }
- public void setOrder_Tip(boolean Order_Tip) {
- this.Order_Tip = Order_Tip;
- }
- //**************************************************************
- //**************************************************************
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement