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 lab8_6;
- /**
- *
- * @author alang
- */
- public class Stall {
- private String id;
- private int burgersold;
- private static int totalburgersold=0;
- Stall(String id){
- burgersold=0;
- this.id=id;
- }
- public void Sold(int burger){
- burgersold=burger;
- totalburgersold+=burger;
- }
- public void display(){
- System.out.println("Burger Stall- "+id);
- System.out.println("total burger sold today is "+burgersold);
- }
- public void displayAll(){
- System.out.println("The total number of burger sold from all stalls is "+totalburgersold);
- }
- }
Add Comment
Please, Sign In to add comment