Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

BUSI 2402 Business Application Development

Assignment 04

Due date: November 28, 2022 [10:00 PM]

I.       [25 marks] GDP final version

We will have another go at the GDP case we have been working during this term. This new version will read the information out of a text file. Be sure to name the file “4GDP.txt” include the 15 countries and their GDP values in the file.

Create a project named GDP04, include a class Countries. Instead of using Arrays, create a Country class with attributes: name, and gdp. Use an ArrayList<Country> to do the work and generate the following listing.

***************************************************************

*                 Top Countries by GDP                         * *************************************************************** Rank  Country                                 GDP (in Trillions)

1

United States

$

20.89

2

China

$

14.72

3

Japan

$

5.06

4

Germany

$

3.85

5

United Kingdom

$

2.67

6

India

$

2.66

7

France

$

2.63

8

Italy

$

1.89

9

Canada

$

1.64

10

South Korea

$

1.63

11

Russia

$

1.48

12

Brazil

$

1.44

13

Australia

$

1.32

14

Spain

$

1.28

15

Indonesia

$

1.05

By A. Ramirez <  Be sure you use your own Last Name and initial.

II.       [25 marks] Graphics!  Naming new colours

A fun marketing job is to create colour names and generate some trends. Have a look at what Dulux® and Pantone® have declared colours of the year:

Dulux’s Olive Spring https://www.dulux.ca/diy/colour/2022-colour-decor-trends                  Pantone’s Very Peri https://www.pantone.com/color-of-the-year-2022-tools-for-designers

You can let your imagination run wild and create as many colours as you want, but at least one in the group must be “your own,” in shade and name. Be sure to write the names of the colours within each block.

Create a project in Eclipse® named ColourTrends. Include two classes: Palette & PaletteViewer. In a (360 x 380) frame with title: Palette of Colours. Rectangles are 100 x 200. The upper corner of the component is at X = 20, Y = 20

 

III.       [50 marks] SYMPHONY NOVA SCOTIA  Association Relationships in Java

 

You can use the solution posted in CU Learn to continue working on the Symphony Nova Scotia case to finish the system by modifying class definitions for the classes you wrote in your previous assignments.

[1]  Implement  the  relationship  PLAYS  between  Musician  and  Instrument,  knowing  that  the relationship indicates that this is a One-to-Many  relationship mandatory in both ends, i.e., a musician must play an Instrument, and an instrument can be played by different musicians.

[2] Implement the relationship SELECTION between Customer (a.k.a., Ticket) and Performance. Another One-to-Many relationship, since there are many Customers attending one Performance, but a Ticket is for one Performance only!

[3] Finally, implement the INSTRUMENTATION relationship. It has been decided that it can be implemented as an aggregation! Basically, a piece is a collection of Instruments. Include a method to show all instruments needed when the piece is scheduled in a performance, i.e., public void showInstrumentation(). See the final version of the NAC Orchestra Class diagram in Brightspace. [4] Modify in each class its “showYourself” method, if needed, to allow an object of that class to send ALL  its  information to the console as text  indicating what type of object they are,  i.e., including a line indicating Im an Instrument.

[5] Include a Tester class, containing the main method and serve to generate and display two instances of each one of the classes, except abstract classes.

IV.       Zip the three projects into one file named BAD-A04-CUSN.zip (CUSN is your Carleton University Student Number) and submit it in Brightspace.