Question: Only code implementations in Java please. 10.1 Credit worthiness The application is about companies and customers, who produce, buy and sell products. Parties involved can

 Only code implementations in Java please. 10.1 Credit worthiness The applicationis about companies and customers, who produce, buy and sell products. Parties

Only code implementations in Java please.

10.1 Credit worthiness The application is about companies and customers, who produce, buy and sell products. Parties involved can have a credit rating. Define an enum for credit rating, which can have the values IRON, BRONZE, SILVER, GOLD and PLATINUM. 10.2 Products Products are the things being created and sold. The signature of the class Product is: public class Product \{ String name; String description; int productionPricePerUnit; // in eurocents List ingredients; public boolean addIngredient(Product product) \{ \} public boolean removelngredient(Product product) \{ \} public int getPrice() \{ \} Besides the methods given, the class has accessor methods, constructors, toString, equals, hashcode and maybe Comparable. I will not mention this all the time; from now on, it is assumed you know and add them. I also do not tell you the correct level of encapsulation, you can add this as is best. The method getPrice is a special one. As you can see, a product keeps a list of ingredients, which are products themselves. The price is calculated by adding the price of all ingredients on top of the productionPricePerUnit. Implement this class. Some products also have a price per unit. We call those Ingredients. Implement a class Ingredient. 10.3 Addresses Addresses will be relevant. An address has the following attributes: String street; int housenumber; String houseExtra; String zipcode; String muncipality; String country; Implement this class. 10.4 Orders An order is when one party buys and one party sells. The attributes of an order are: private final int orderld; private final IBuyer buyer; private final ISeller seller; private final Product product; private final LocalDate date; private final int price; Implement this class. 10.5 Being able to buy and sell There will be buyers and sellers. As it is not clear who can buy and sell, we want to have this flexible. Define two interfaces. IBuyer has as a signature: boolean buy(Product product, ISeller seller, int price); boolean buy(Order order); ISeller has as the signature: boolean sell(Product product, IBuyer buyer, int price); boolean sell(Order order); Define the interfaces

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!