CW3 Clarifications
We have had many questions about CW3 this week. Here are the answers to some common problems:
many of you are making it too difficult and are thinking about it too much! We will update this if there
are more questions.
First point: if you have done any of the things outlined below, and it works ok, then leave it.
Flower size: the user does not choose this. It is set by your program.
AddFlowerbed: this is one single process, which asks the user to input x, y, width, height, and
choose the flowers and pattern (if they want a pattern). You then know the flowerbed size, and
the flower size, so you can calculate the number of rows and columns, number of flowers, and
layout the flowerbed. The flowerbed will be displayed, full of flowers. It never changes.
This means you never need to add single flowers. After a bed is displayed on screen, it can be
removed, but it never needs to change. If a flowerbed is 500x400, and your flowers are 25x25,
your flowerbed will be 20x16, and display 320 flowers. If the flowerbed has no pattern, you can
create an arraylist of 320 flowers and give it to the flowerbed.
The user does not choose the background image for the flowerbed. This path can be coded in
your flowerbed class.
If the user chooses a pattern of three different colours/flowers, they do not have to choose
which ones. Your program can give them any three. (If you have made it so the user can choose,
that is fine).
Remember, you can still get very good marks with no patterns. Or with a simple pattern of
vertical or horizontal stripes, and only two colours. It is much better to submit a simpler
program that works properly!
If you need to make your flowers have a transparent background, you can set
this.setOpaque(false) in the appropriate constructor
If your flowerbeds overlap, it does not matter. You do not need to check if the flowerbeds
overlap each other
Many of you are developing very complex patterns. You do not need to worry about the
complexity of the patterns. A choice of 2, plain and a pattern, is acceptable
? Can i put the information in two different txt files, like one stores the information about flowers
and the other stores the information about flowerbed? It can load the images upon opening the
project just like the one-file's one – Yes!
Should I submit a netbeans project zip + four TXT files (my java class files)+ a word file
containing uml diagrams? Yes
CW3留学生作业代做、代做java编程作业、代写java课程设计作业、Clarifications作业代写
'do I need a such-and-such class?':
You should have a number of classes, each class serving one purpose. Classes often represent
the functions of real-world objects. But you can choose the real-world objects that you wish to
represent.
Does your Garden need objects for flowerbeds? What would they do?
Does your Garden need objects for flowers? What would they do?
Does your Garden need any utility classes? To provide what services?
Generally, your main class (and main method) should be as small as possible (very few methods)
but control everything. All messages pass through main. And most methods should be grouped
together in other classes representing the objects of your application.
因为专业,所以值得信赖。如有需要,请加QQ:99515681 或邮箱:
微信:codinghelp