Write a Java program called Masterpiece contained in 1 Java source file that wil
ID: 3848770 • Letter: W
Question
Write a Java program called Masterpiece contained in 1 Java source file that will draw a picture of your own design onto a DrawingPanel object. For this assignment, you will have to put the DrawingPanel.java class file in the same directory as your Masterpiece.java file.
You will also need to include the following import statement at the top of your Masterpiece.java file:
import java.awt.*;
Furthermore, in your program, you’ll have to include something like the following to get your Graphics object:
DrawingPanel panel = new DrawingPanel(600, 300);
Graphics g = panel.getGraphics();
REQUIREMENTS
2) Use method(s) that will draw a composite image (made of multiple shapes or lines) given an (x, y) locationas parameters to the method. Reuse the composite image by calling this/these method(s) multiple times with different parameters. In class, I used a tree as an example. You can have more methods with more parameters, if you like. But you need at least one.
3) Use at least 3 different colors in your picture.
4) Use as least 3 different shapes types (line can be considered a shape type) in your picture.
Explanation / Answer
BCNF acts otherwise from 3NF only if there square measure multiple overlapping candidate keys.
The reason is that the purposeful dependency X -> Y is in fact true if Y could be a set of X. thus in any table that has only 1 candidate key and is in 3NF, it's already in BCNF as a result of there's no column (either key or non-key) that's functionally smitten by something besides that key.
Because every dish should have precisely one in every of every topping kind, we all know that (Pizza, Topping Type) could be a candidate key. we tend to additionally apprehend intuitively that a given topping cannot belong to differing types at the same time. So (Pizza, Topping) should be distinctive and so is additionally a candidate key. thus we've 2 overlapping candidate keys.
I showed Associate in Nursing anomaly wherever we tend to marked mozarella because the wrong topping kind. we all know this is often wrong, however the rule that creates it wrong could be a dependency Topping -> Topping kind that isn't a legitimate dependency for BCNF for this table. it is a dependency on one thing aside from a full candidate key.
So to resolve this, we tend to take Topping kind out of the Pizzas table and build it a non-key attribute during a Toppings table.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.