Advertisement
Vladkoheca

main.java

Dec 6th, 2024
15
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.44 KB | Source Code | 0 0
  1. public class Main {
  2.     public static void main(String[] args) {
  3.         DeliveryPerson deliveryPerson = new DeliveryPerson("Vlado", 4);
  4.         System.out.println(deliveryPerson);
  5.         deliveryPerson.deliverOrder(false);
  6.         System.out.println();
  7.         Order order = new Order("60793930613", 100);
  8.         order.displayInfo();
  9.         System.out.println("The new price after the discount is: " + order.applyDiscount(50));
  10.     }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement