拼多多订单生成器手机版,支持淘宝京东截图生成,E4A源码,仅供娱乐学习

发布时间 2023-11-19 12:17:18作者: 新壳软件

闲着用E4A对接了JAVA类库制作了一个订单生成器,当然我叫了水印,这个软件或者里面的截图做不了啥坏事,仅仅用来学习娱乐装逼用的,下面是框架和代码。

框架图1:

 

 

框架图2:

 

 

JAVa代码库:

======================================================

// 商品类

class Product {
String name;

double price;

int quantity;

public Product(String name, double price, int quantity) {
this.name = name;

this.price = price;

this.quantity = quantity;

}

public double getTotalPrice() {
return price * quantity;

}

}

// 订单类

class Order {
private List<Product> products = new ArrayList<>();

public void addProduct(Product product) {
products.add(product);

}

public double getTotalAmount() {
double total = 0;

for (Product product : products) {
total += product.getTotalPrice();

}

return total;

}

public void printOrderDetails() {
for (Product product : products) {
System.out.println(product.name + " x " + product.quantity + " @ $" + product.price + " each");

}

System.out.println("Total Amount: $" + getTotalAmount());

}

}

// 订单生成器类

public class OrderGenerator {
public static void main(String[] args) {
Order order = new Order();

order.addProduct(new Product("Apple", 0.99, 10));

order.addProduct(new Product("Banana", 0.49, 5));

order.printOrderDetails();

}

}

=====================================================