You will develop a moderate-sized Java program in order to demonstrate your understanding of topics from weeks 1 to 7.
You are provided a detailed set of functional requirements which describe the behaviour that must be exhibited by the program you create. In addition to the various functional requirements are a few other requirements that specify suggested implementation approach to be taken. These are all detailed in the remainder of the assignment. Make sure you read it all carefully before you commence, so you understand what needs to be achieved. Finally, there are a range of suggested Tasks to be completed (see next page).
In terms of marking, only half the marks pertain to the correct behaviour according to the functional requirements, the other half of the marks are for appropriate approaches to coding (to assess your progress towards demonstrating attainment of the skills encompassed by the learning objectives of the course).
If you have any questions about any of the requirements, please ask your teacher through their preferred means of communication.
Tasks to be completed
The following is a description of the tasks you may want to complete to address the needs of this assignment:
- Read through the entire assignment task description (all 9 pages) to understand what the program needs to achieve and how you will be
- Perform a textual analysis to identify potential classes (look for nouns), potential methods (look for verbs or actions), potential fields/data (look for nounsagain).
- Develop an initial class diagram to organise your thoughts. (This is not)
- Accept the GitHub Classroom assignment by clicking the link in Moodle (underneath the link you clicked to obtain this document) to create your repository, and then clone/link it into your IDE as you have done in the lab
- Start coding, by taking one functional requirement to start with. Identify the tests that you might need to check/prove that it is addressed and correct, and develop code to address it. Once that functional requirement is fully addressed/working and tested, commit the code to the repository (you can commit more frequently if you wish), then take another functional requirement and repeat the process. Keep the supplementary document up to date as you go
- Submit the completed
Assessment Details
Overview
An advertising agency wants a program which allows them to create and manage quotes for their customers. Customers are any other business or organisation that wants to promote a product, service or event that they might be offering. For example, a supermarket might want to promote special discounts each week. A school might want to promote that it is having an open-day for parents to come and visit the school to consider sending their children to it in the future.
Context/Background Information
When an organisation decides that it wants to promote a product, service, or event, it may look to advertising agencies to “get the message out” by an advertising campaign in a way that has impact, across various media such as television, radio, Spotify (an app focused on music/audio), newspaper/print, web and other mobile apps. Such an organisation is called a client of the advertising agency.
The advertising agency is a company which employs a range of people with skills at preparing promotions for these various types of media. When an organisation comes to it asking for a quote, the advertising agency will make judgements about how long tasks will take, how soon the advertising campaign needs to be ready to become ‘activated’ (actually appearing/being rostered in the media), how long the campaign is to last for, and how the advertising agency might be able to fit in the work for this client in comparison to other clients. They will calculate costs of this work, and the additional cost of placing the campaign into the various media channels, and from this information determine a ‘cost’ to the client. They tell this to the client in the form of a “quote for services”. The client can compare quotes received by different agencies and decide which one to accept and continue with.
If the client decides to go ahead with the advertising campaign with that advertising agency, the agency requires an up-front payment of some portion of the quoted total cost to begin the work. Once the preparation work is complete, they present the work to the client for their approval to actually go ahead and ‘place’ the ads into the selected media channels. Some of these channels must be fully paid before placement can occur; others allow for spreading the payment across separate weeks – in any case, the first payment must occur before the placement can begin, and with campaigns that run for multiple weeks, each week’s payment must be made before the week begins.
The program you are to write should be capable of obtaining information about a potential advertising campaign for various clients, and from that generate a quote. The quotes are stored (in memory), and as payments are made, the amount owing is decreased, and the total earned from that campaign is increased. The program should be able to report summary information about all campaigns, as explained further in the various functional requirements listed later.
Functional Requirements
The following are the Functional Requirements (FR) that the program must achieve.
FR-1: The program must be a text-console menu-based system
As we have not yet learned about making GUI programs in Java, you are to make a program that operates through the console (using System.out for output, and Scanner for input).
The program needs to allow the user flexibility in what actions they perform, and so you should be designing the user interaction to make use of menus, that is, you display to the user a list of the actions that they can perform as a numbered list, and the user selects the desired action by entering the corresponding number. Some actions available in the top-level menu may lead into a period of being in a sub-menu which has a task-specific set of actions that could be done – if so, there needs to be a way to ‘exit’ back to the main/top- level menu.
FR-2: Allow the user to create a quote for a new advertising campaign for a client
Each new advertising campaign job from a client (or potential client, if they’ve never used the agency before), needs to begin by setting up the quote.
A quote has two parts: The cost of preparing the campaign (e.g. artwork, soundwork, videos), and the cost of running the campaign (also called ‘placement’ of the campaign).
Further details on the way in which costs are worked out for the various different target media channels is explained in other Functional Requirements.
Note: You are not expected to cater for multiple different types of campaigns in the one quote. (e.g. If a client wants to have both a radio advertising campaign and a television advertising campaign, these can be considered as separate campaign jobs). But you are allowed to try this if you feel confident.
FR-3: Allow quoting for radio and Spotify advertising campaigns
This type of ad campaign relies solely on audio.
The cost of preparing a campaign for these media channels is $20 per 15 seconds. For example, perhaps the school wanting to advertise its “open day” event, wants 3 different 30-second ads created and will select 2 to actually run. Each ad will be for 30 seconds and feature different wording (two will be for a general message about the school having the open day and giving general information about the school, the third will be saying specific events that are occurring during the open day). As the agency is preparing 3 ads, the cost of preparation work is $120. (3 x (2 x $20)).
As another example, a home furniture shop may want a campaign to advertise its Spring Clearance sale, and it wants one 15-second ad and another 30-second ad that gives greater detail. The cost of this would be: ($20) + (2 x $20) which is $60.
To actually run the ads once the preparation work is completed, the following rules apply for ads placed on radio:
- The client must nominate how many radio stations they want it to be played on during business- hours(Mon-Fri from 8am until 6pm), and how many weeks they want (minimum of 1 week – any consecutive 7 day period). For each radio station, it will cost $70 for each
- The client must nominate how many radio stations they want it to be played on during evenings(Monday to Friday, from 6pm until 11pm), and again how many weeks they want (minimum of 1 week). For each radio station, it will cost $60 for each
- The client must nominate how many radio stations they want it to be played on during overnight and weekends(all times not already covered by the previous two categories), and again how many weeks they want (minimum of 1 week). For each radio station, it will cost $35 for each
For example, if the school wants radio advertising on 6 radio stations during business hours for 3 weeks, and advertising on 3 radio stations during evenings for just 2 weeks, the calculation will be:
3 x (6 * 70) + 2 x (3 * $60) which is $1620 all up.
FR-4: Allow quoting for television advertising campaigns
This type of ad campaign relies solely on television broadcasting.
The cost of preparing a campaign for these media channels is $110 per ad for a basic advertisement consisting of still images (possibly with text appearing over the images) with a voice over announcement; or
$250 per ad for anything that involves actors and cameras at a location. All TV ads are for 30 seconds.
For example, perhaps the furniture shop may want to show images of its furniture perhaps 5 seconds per item while a person is talking about the price. This would costs $110. If they want to have filmed footage of people walking around the shop and talking to a salesperson, this would instead cost $250 to make.
To actually run the ads once the preparation work is completed, the following rules apply for ads placed on television:
- The client must decide how many channels the ad is to be placed on, and state how many of those channels they want to have high exposure, medium exposure or low exposure on. High exposure will cost $400 per week, medium exposure will cost $280 per week, and low exposure will cost $150 per week.
- The client must decide whether they want to also feature in any specific type of programs, such as sports, news, children’s programs. If they do, then this increases the cost per week by another $100 per week (per channel that this has been chosen for). Otherwise they will just be shown at any time of the day and in all types of programs (including possibly in those specific categories, but less often than if they nominate to specifically feature inthem).
For example, if a garden centre/shop (plant nursery) wants advertising on 3 channels for 4 weeks, 2 of which will be low exposure and 1 will be high exposure, and they also want to feature on one of the channels during its home-improvements program, then the calculation will be:
4 x ( (2 x 150) + (1 x 400) + 100) ) which is $3200 all up.
FR-5: Allow quoting for newspaper advertising campaigns
The cost of preparing an ad-campaign for newspapers is based on the size of the advertisement, measured in square centimetres. This is determined by multiplying the rounded width by the height, (rounded up to nearest centimetre). So an ad that is 4 cm wide and 8 cm high is 32 square centimetres.
The base cost to prepare an ad for newspaper is $1.35 per square cm. If graphic design work is needed (as opposed to just plain text or provided images from the advertiser), then there is an additional cost of $20.
Placement of ads into actual newspapers is also based on size, as well as on whether colour is required. For plain black-and-white advertisements, the cost is $2.20 per square cm. For full-colour ads, the cost is $4.80 per square cm.
Additionally, if the ad is to appear in a prominent place within the newspaper, there is an additional fee of $10.
You need to ask how many newspapers it will appear in. The same newspaper brand on different days is counted as separate newspapers (e.g. the Monday “Herald Sun” newspaper is different from the Tuesday “Herald Sun” newspaper).
All newspaper ads must be fully-paid-for before any are included in the actual newspapers. There is no option to spread payments out (other than to pay for the design work, then pay for the total placement cost).
FR-6: Allow quoting for Web and App advertising
The cost for setting up ads to appear on the Internet and in mobile apps, is $5 per static image, or $7 per ‘animated’ image (which can flip between several images in a cycle whilst being displayed, e.g. every few seconds its goes to the next image of the sequence).
The client needs to nominate a maximum amount they are willing to spend, and the agency will place the ads across the various advertising platforms (such as Facebook Ad Manager, and Google Ads) with maximum amount of bidding based on the nominated amount.
After the design work (to set-up the ads), if deciding to go ahead with placement, the nominated amount must be paid in full before any of the digital ads are placed on the advertising platforms. There is no option to spread payments out.
FR-7: Progressively specify and display quote for desired advertising approach
The expectation is that when a client’s quote is being prepared, the user will gradually be adding information to the quote. This should be via an interactive text-menu based system. You are not expected to be able to delete an element of a quote after it has been added, but you must be able to add additional elements. After each new element is added to a quote, the system should display the itemized set of elements making up the quote. (The quote only needs to be for one type of campaign, e.g. Newspaper).
For example, perhaps after the garden store mentioned in FR-4 has specified that it wanted TV advertising on 3 channels for 4 weeks, 2 of which will be low exposure and 1 will be high exposure, and that they wanted to feature on one of the channels during its home-improvements program, it sees the quote amount is less than the amount they had set aside for the campaign, and so they decide to add advertising of medium exposure on another channel for 4 weeks. After adding that additional element, the updated quote should be shown.
The following is an example of how the quote might be presented:
1 x Feature in specific programming for 4 weeks: $400.00 Quote Total $3450.00
After seeing the above quote, the garden shop decides to add the medium exposure on another channel, the difference would be an additional line in the quote (and a recalculated “Quote Total” line):
1 x Medium Exposure TV campaign for 4 weeks: $280.00
The order in which elements making up the quote appear, is not important. The quote should also say who the client is!
FR-8: Program must allow quote to be accepted for design to proceed
“Accepting” a quote means that the client is happy to proceed with the design work outlined in the quote. This means the quote should become immutable in terms of no further elements of advertising placement being able to be added to it (as this would adjust the price). However, the amount owing can still be altered as payment is made.
There must be some way that the user can indicate that the client accepts the quote. It is assumed that at that moment, the payment for all the design work is made, but not any of the placement amounts. The job advances to the state of designing the work.
FR-9: Program must allow client to agree to proceed with placement, or abandon the job
After the design work is completed and presented to the client, the client will then decide whether to proceed with placement, or whether to abandon the whole thing (they might go to a different agency, for example).
If they abandon, no further change is required to be made to data / objects – the placement costs will just remain unpaid (they may at a later time decide they will actually proceed to placement).
If they agree to proceed, then a further amount is due. In some cases (Radio, Television), they must pay at least the next week’s costs. (When there are some elements that go for more weeks than others, just calculate an average of all elements of the quote, based on the longest period of any element of the quote).
In other cases (Newspaper, Web/App), they must pay the whole amount remaining due.
The program must allow the user to indicate that a client is making a payment towards the job quote, and the amount to be paid must be the total amount immediately due as described in the preceding paragraph. If they enter an amount that is less than the amount immediately due, then no payment amount should be recorded as having been made. Similarly, if they enter an amount that is more than the total unpaid amount (tolerant to within a few cents extra), then no payment amount should be recorded in this case either.
It should be possible to see the same information that was in the quote (as at the time of accepting the quote), and to see the total payments that have been received so far. This should be shown before asking for the amount of payment being made. Also, the amount that is immediately due should be shown before asking the amount of payment that is to be recorded as being made.
If the payment amount leads to the total payments towards this campaign being equal to (or slightly exceeding) the total amount that the quote was for, then that advertising campaign/job is considered closed or finished. Once closed, no more attempts to make payments towards that campaign should be permitted (it should report some error/message to the user).
FR-10: The system should keep all clients’ campaign details in the system
Usually some time passes (in days) between when a client asks the agency to start designing the advertising campaign, and when that design work is completed. So, the details of each quote need to be recorded in an in-memory storage mechanism, so that any client’s quote can be retrieved at a later time whilst the program is still running. To aid this, each job (for a particular advertising campaign for a particular client) should be able to be made into the focus of attention for some of the functions (e.g. the ‘make a payment’ function should ask the user to identify which job the payment is going to be for). You may like to present the user with a list of all the open campaigns (i.e. non-closed ones), so that the user can select the one to be acted- upon. Another option is to give each job a unique ID number that can be entered by the user later – but if this is done, make sure that the user is clearly informed what this is and that they will need it in the future.
FR-11: It must be possible to see the current status of any quote
At any time, the user should be able to bring up the quote of any client job to see:
- The elements of the quote (display these as mentioned in earlierFRs)
- How much has been paid / remains to be
- The status as being either: quoted (but not begun), design work done (but no advertising placed yet), placed, or complete (closed, fullydealt-with).
Other Assessment Requirements
These are other things you must address or consider in developing your solution. See also the marking guide at the back.
OR-1: Complete a written support document
Some of the following other assessment requirements require you to write some things in a document to be submitted in conjunction with the code.
OR-2: Must use inheritance and make subclasses
A primary purpose of this assignment is to assess your ability to use inheritance in appropriate ways and places. Whilst it is possible to complete this assignment without inheritance, the solution would be less ‘elegant’ (and more complex).
You should think about what parts of the problem lend themselves to the use of subclasses. In your written support document, explain the ways you have used inheritance, and explain why you have chosen those ways. Also explain at least one case you have used overriding, and say why that was appropriate.
OR-3: Must demonstrate polymorphic method calls and have polymorphic variables
Your code is expected to make use of polymorphic variables and to involve polymorphic method calls.
In the written document, explain where/how you have used a polymorphic method call somewhere in the final code.
OR-4: Use Git to keep track of incremental development work
You are expected to use Git as a source code control system. You are expected to commence by “accepting the GitHub classroom assignment” for this assignment, and then as you work on parts of your solution, you should be committing and pushing that work to the repository on GitHub.
“Incremental development” means that you are gradually working towards a goal, and are evolving the system’s functionality as time proceeds. As you get each functional requirement completed, or make a significant effort of coding a particular class, you should commit that to the repository. You should only be committing code that is free of syntax errors (and hopefully free of logical errors).
In your written document, include the URL of the repository created by GitHub classroom that contains your committed code. The marker will be examining your commit history.
OR-5: Follow a test-driven approach (for at least some campaign types)
You are encouraged to also adopt a test-driven approach to development. As a minimum, this means that you would write a range of test-cases that can automatically check (and subsequently re-check) that code is behaving correctly for a range of circumstances. To fully adopt the process would involve writing tests before you write the code that the tests are meant to test. It will be sufficient (for this assignment) that you just make sure that at some stage you are performing the tests of code, but preferably you would test code before it is committed to the Git Repository. (The code containing the tests should be committed to the repository as well).
OR-6: You need to consider what other classes may be needed to make things “work”
In order for the functional requirements to be met, will require a range of classes to be written. Some of these may be obvious from the descriptions given earlier. But you will need to consider more completely what set of classes are required to fully enable the program to be realised. You might like to develop UML class diagrams to help you understand the structuring of the program – these will not be marked and do not need to be submitted.
You will also be assessed on the appropriateness of choices of programming constructs used in your code (such as methods, fields, constants).
Also note a few other things in the marking guide
Marking Criteria
The work will be marked according to the scheme provided on the next page
There are 10 assessment items. The first includes sub-items.
Criteria |
Available Marks |
Assessment Item 1: Correctness of Functionality |
30 marks by scaling the 35 points: |
FR-1: The program must be a text-console menu-based system |
3 points |
FR-2: Allow the user to create a quote for a new advertising campaign for a client |
2 points |
FR-3: Allow quoting for radio and Spotify advertising campaigns |
4 points |
FR-4: Allow quoting for television advertising campaigns |
5 points |
FR-5: Allow quoting for newspaper advertising campaigns |
5 points |
FR-6: Allow quoting for Web and App advertising |
4 points |
FR-7: Progressively specify and display quote for desired advertising approach |
Together worth 4 points |
FR-8: Program must allow quote to be accepted for design to proceed |
|
FR-9: Program must allow client to agree to proceed with placement, or abandon the job |
|
FR-10: The system should keep all clients’ campaign details in the system |
3 points |
FR-11: It must be possible to see the current status of any quote |
5 points |
Assessment Item 2: Ability to appropriately designate responsibilities to classes across the system |
4 marks |
Assessment Item 3: Ability to use inheritance to make subclasses |
4 marks |
Assessment Item 4: Ability to use polymorphic variables to refer to an object of any subclass type |
2 marks |
Assessment Item 5: Ability to use polymorphic method calls |
2 marks |
Assessment Item 6: Ability to implement aggregation |
4 marks |
Assessment Item 7: Ability to perform input and output |
4 marks |
Assessment Item 8: General Ability to develop a programming solution to a problem |
2 marks |
Assessment Item 9: Ability to use Git to keep a history of incremental progress on a project |
5 marks |
Assessment Item 10: Ability to follow a test-driven approach |
3 marks |
TOTAL: |
60 marks |
There are 35 ‘points’ available for the functional requirements being correctly addressed/met in the final program’s observable behaviour. The total points out of 35 will be scaled to a mark out of 30, to be added to the remaining potential marks for other assessment items, to get a total out of 60. In general, to get the full marks for an assessment item (other than the first one) requires that you have adhered to the principles taught in the course in regards to programming or practices.
The total mark out of 60, will be scaled to a value out of 20 to contribute 20% to the final course mark.