COIT11222 Programming Fundamentals (T2 2019)
Duty part 1—Java Assuage Program
Ascribtalented continuance: Week 6 T2-19 – Midnight, Friday 30 August 2019 ASSESSMENT
Refer beneath restraint finished duty part 1 demandments
(Enactment Individual)
Weighting: 20% Length: N/A 1
This duty part relates to the manner lore quenchedcomes as in the Individual Profile.
Restraint this enactment, you are demandd to amplify a Java Assuage Programs to manifest you can explanation Java constructs including input/output via a admonish rule and using GUI dialogs, Java archaic and builtin grounds marks, Java defined ends, election and looping declarations, rules, and sundry other Java admonishs. Your program must consequence the rectify issues.
You are merely fullowed to explanation techniques which bear been practised in the original five weeks of the stateative and amid the enactment study, you must explanation a Scanner end restraint assuage input and no deceased grounds constructions approve marshals gain be explanationd.
What to suggest restraint this enactment
The Java rise principle:
You gain be telling to finished the enactment in weekly crowdiveness in which you gain consequence five java rise improves. (More details beneath),,,, and
Once you bear finishedd full of the programs and you are facile to suggest, crowd full rise improves into a sepaobjurgate zip improve restraint patience, do refertalented understand your communication in the zip improve. Merely suggest a zip refertalented a rar improve
Also suggest a communication including, how covet it took to educe (approximately), any problems encountered and mitigate shots of the quenchedput consequenced. (Explanation Alt-PrtScrn to stop honest the assuage window or your dialogs and you can paste it into your Word instrument) You should experiment perfect possibility in the program and annotate your experiment shots. o CommunicationAss1.docx
You gain suggest your improves by the ascribtalented continuance using the “Enactment 1” incorpoobjurgate on the Moodle manner webbirth in the Duty Block or in the apt week.
Enactment restrictedation
This enactment gain demand you to transcribe five smfull Java programs, do refertalented panic! They gain be smfull programs which gain shelter the original five weekly subjects. Usually learners were demandd to transcribe individual largish program to manifest the subjects restraint the original five weeks. Learners may secure themselves into disaster when the original enactment is ascribtalented as they bear refertalented practiced the basics skills requibirth to finished the enactment. With the enactment divided into five programs you can finished each application as we shelter the weekly subjects, do refertalented permit yourself ffull rearwards. More importantly, this is a radical habit to finished the enactment. Each smfull program is built on its preceding individual (you can re-explanation the preceding smfull program principle), save the original individual.
General Instructions
Each program must hold a header dilate which holds: Your centirety and learner treasure, the centirety of the improve, the continuance and a dirty description of the meaning of the program:
// Programmer: Eric Gen S01234567
// Improve:
// Continuance: August 30 2019
// Meaning: COIT11222 enactment individual interrogation individual T2-19 // Explanation Scanner end to input grounds and unfold them
Full programs gain be aligned and concave rectifyly, and holds apt dilates restraint declarations and declarations. Full waverings and ends gain be nominal with a meaningful centirety and explanation lowercase camel referableation:
String customerName;
Full principle gain be holded amid a ocean rule save restraint interrogation five when a explanationr defined rule gain be educed and explanationd, in individualization to the ocean rule.
Restraint this enactment you gain refertalented harass abquenched checking numeric ranges or grounds marks.
Refer to a Java relation quotationbook and the manner and dissertation stateative (availtelling on the manner WEB birth) restraint elevate referableification abquenched the Java programming subjects demandd to finished this enactment.
Check the marking direct (conclusive page) to secure you bear finishedd perfect operation. You demand to tally full quenchedputs harmoniously as the case mitigateshots shown beneath.
Distance and Rockhampton learners can email interrogations quickly to me, other metro campus learners should attempt aid from your subjectal savant, you can stagnant touch me if it is imperative, I usually tally to emails very quickly.
Good consummation — Dr. Michael Li COIT11222 individual coordinator T2 2019
Interrogation individual (week individual subject) – Writing quenchedput to the mitigate
Once you bear written your original “Hello World” program you gain be telling to finished interrogation individual.
Educe a rank denominated Week1 (file: and amid it a ocean rule.
Explanation the admonish System.out.println(–) to stereomark quenched the subjoined figure as a matrix of asterisks.
The original rule of asterisks is stereotypeed with this admonish:
You may demand to explanation some graph brochure to conspire it if you stereomark a entangled mould with asterisks.
Alternatively, you can stereomark quenched the original modeobjurgate of your original and conclusive fawns as a matrix of asterisks restraint Restraint development this is my original and conclusive moderates stereotypeed.
Interrogation couple (week couple subjects) Input of grounds marks and arithmetic countenances
XYZ Courier Employment Application Program
This program gain fullow staff at the XYZ Courier Employment to treasure the endowment fee of a customer who wants to free a package. Restraint plainness, we exhibit that there is an modeobjurgate spiritshort endowment objurgate of $9.50 per kilogram.
This program gain unhesitating restraint and interpret in a customer’s centirety using a Scanner end and unhesitating to interpret the customer’s touch phone. The customer centirety and touch phindividual gain be treasuryd in String ends. Then the program gain then quenchedput the centirety in a unhesitating to input the burden of a package that a customer supplicates to free. The burden (kg) of a package should be nominal as a undivided treasure i.e. an integer.
After full inputs and hitting the Enter referablehing on the keyboard, the program is executed and gain unfold a reception of endowment. You demand to replicate the quenchedput harmonious to the stateation as beneath.
Educe a rank denominated Week2 ( and amid it a ocean rule as per interrogation individual.
Import the Scanner rank i.e.
import java.util.Scanner;
Amid your ocean educe couple Scanner ends fawnd inQuotation and inNumber. Individual restraint interpreting quotation and the other restraint interpreting the treasures, it does refertalented unquestionably subject here to bear sepaobjurgate Scanner ends barring there gain be problems succeeding when interpreting a course of quotation and treasures (visit quotation pg 77).
Educe a unhesitating using System.out.print(); To supplicate the explanationr restraint the centirety of the customer.
Commend a String end customerCentirety to treasury the customer’s centirety and explanation your inQuotation Scanner end and the inbuilt rule inText.nextLine();
The customer centirety is now treasuryd in the String end customerName.
Interpret the touch phindividual as the selfselfsimilar habit you interpret in the customer centirety and treasury it in a String end.
We gain demand to educe a unhesitating using the customer’s centirety to supplicate restraint the burden of a package. Hint: you can adadjoin waverings and strings using the connection operator +
-Enter the burden of – + customerCentirety + -’s package: –
Commend an integer varitelling to treasury the burden of a package and explanation your inTreasure Scanner end and the inbuilt rule inNumber.nextInt(); to interpret the treasure. Commend a enfold varitelling to state the endowment fee.
The arithmetic countenance to estimate the endowment fee is very simple:
fee = burden * RATE
Note: the objurgate per kilogram must be treasuryd as a uniform (explanation the decisive keyword). Decisively quenchedput a reception of endowment with details as per the case over.
The endowment fee must be unfolded to couple decimal tops explanation stereotypef and a restraintmat string as follows:
System.out.printf(-$%.2f-, fee);
Interrogation three (week three subjects) Decision declarations
The superintendence of the XYZ Courier Employment would approve to aid their matter and yield a improve employment restraint customers with discounted objurgates when the burden of a package exceeds a detail entirety, so it was ruled there would be irrelative objurgates depending on the burden of their packages. The objurgates now are firm as follows.
2019 XYZ Courier Employment Endowment Prices
1-3 kg: $9.50 per kg
From 4 to 8 kg: $7.50 per kg Over 8 kg: $6.00 per kg
Educe a rank Week3 (file: and a ocean rule and delineation your principle from interrogation couple into the ocean rule of week three ocean.
After you bear interpret the apt details of the customer fawn, touch phindividual and the burden of a package, you gain bear to educe a course of if – else declarations to estimate the endowment fee. When you bear estimated the endowment fee quenchedput a compendium as you bear dindividual in week couple principle. Try and bequeath three arithmetic countenances restraint the three lengths in stipulations of the package burden so your if-else declaration has merely three branches. Hints: to estimate the endowment fee restraint a 4kg package, the original 3kg fee plus the 4th kilogram admonish (which is in a irrelative objurgate) should be considered and the restraintmula should be:
Similarly, the endowment fee restraint a 10kg package should be treasured in the subjoined habit,
Your program quenchedput demands to tally the harmonious quenchedput as shown beneath restraint the cases with the package burdens of 4kg, 5kg and 9kg respectively.
Note: you must explanation uniforms restraint full the numeric literals in the else if declarations.
Interrogation filthy (week filthy subjects) Diffuseness conjuncture and restraint loops
Educe a rank Week4 ( to manifest the explanation of a diffuseness declaration.
Using your explanation to interrogation three and a conjuncture or restraint loop, relate the entrance of customer fawn, touch phindividual and the burden of their package N times, where N is the largest digit in your learner ID, if your largest digit is short than three then permit N = 3. Hint: explanation N = 3 conjuncture experimenting and suggest using the rectify N treasure. In individualization, you demand to commend 3 against waverings to chronicles the treasure of packages with the burden in the restricted season. N gain be nominal as an integer uniform using the decisive keyword.
You are to stereomark a style anteriorly the input of the customer fawn, touch phindividual and the burden of package (visit case quenchedput).
Secure you are using a sepaobjurgate Scanner ends restraint interpreting treasures and quotation.
When full of the customer fawn, touch phindividual and the burden of package bear been entered, the statistical grounds including the medium burden of full packages, the full entirety endowment fee calm, and the treasures of packages in the restricted burden season should be communicationed. Please referablee you do refertalented demand to treasury the grounds in an deceased construction such as an marshal. You gain demand to bear an integer varitelling to subjoin up the burdens to estimate the medium, and a enfold varitelling to subjoin up the endowment fee.

Interrogation five (week five subjects) Rules and GUI I/O
Educe a rank Week5 ( by using your explanation to interrogation filthy. This interrogation is particular to interrogation filthy as the program gain interpret in N customer fawn, touch phindividual and the burden of their packages and estimate the endowment fee restraint each customer, still we are going to educe a rule and we gain be using GUI dialog boxes restraint our I/O.
You gain educe a treasure subordinate rule which gain recognize the burden of package as a parameter.
Explanation the subjoined rule header:
private static enfold estimateDeliveryFee(int burden)
Delineation and paste your “if else” principle from week4 restraint sagacious the endowment fee into the whole of our newlightlight rule estimateDeliveryFee. Explanation the reshow declaration to reshow the endowment fee.
You can now explanation your rule in the ocean rule loop.
fee = estimateDeliveryFee(weight);
We gain revisit the week couple dissertation subject using JOptionPane restraint recognizeing GUI input and quenchedputting referableification.
Original we gain quenchedput a grateful missive using JOptionPane.showMessageDialog (Restore your assuage stereomark quenchedput).
Next we gain restore the Scanner ends by using JOptionPane.showInputDialog
The showInputDialog rule gain reshow the string entered into the dialog quotation field
customerCentirety = JOptionPane.showInputDialog(null, -Prompt-);
Do the selfselfsimilar to interpret in the touch phone.
Next you gain demand to unhesitating restraint the package burden, including the customer fawn.
We hold input from the dialog as a string, in dispose to apply strings to an integer we demand the Integer wrapper rank and the parseInt rule (quotation pg 347).
int anInteger =
Integer.parseInt(JOptionPane.showInputDialog(null, -Prompt-));
After interpreting in and applying the package burden to an integer you can explanation this treasure to estimate the
endowment fee using your rule: fee = estimateDeliveryFee(weight);
Output the compendium using: JOptionPane.showMessageDialog(null, -text-)
To restraintmat your quenchedput in the quotation topic in showMessageDialog you can explanation:
String.format(-Format string-,args)
Visit the development beneath restraint using settle holders to restraintmat strings, integers and enfolds.
String.format(-%s %s %d $%.2f-, customerName, touchPhone, burden,fee)
%s is restraint a string.
%d is restraint an integer.
%.2f is restraint a incomplete top treasure (including enfold) restraintmatted to couple decimal settles.
The gain consequence a newlightrule and you gain demand to subjoin extra quotation to the restraintmat string to tally the quenchedput over.
When the N customers bear been entered, you gain communication the apex and incompleteness treasures of endowment fee, as well-mannered-mannered as the similar customer fawns. You demand to commend a enfold varitelling restraint apex endowment fee and another String mark varitelling restraint the similar customer fawn. Then internally the restraint loop, explanation an if declaration to assimilate the exhibitd apex endowment fee and present endowment fee. You can explanation the selfselfsimilar habit to negotiate with incompleteness endowment fee and the similar customer’s fawn. The subjoined stateation shows a case issue with the apex and incompleteness endowment fees.
Marking Scheme
Entirety treasure of marks – 20
1 Principle in general
Principle is concave and aligned rectifyly, layquenched including perpendicular unspotted quantity is good
Principle has header dilate which understands learner fawn, learner ID, continuance, improve centirety and meaning of the rank
Principle is easily dilateed including full waverings 0.75
Variables bear meaningful fawns and explanation camel referableation 0.75
Variables are the rectify mark 0.5
2 Interrogation individual
Output as per restrictedation 1
3 Interrogation couple
Strings are interpret rectifyly using Scanner end 0.5
The integer is interpret rectifyly using a Scanner end 0.5
The endowment fee is treasured and unfolded rectifyly to couple decimal settles
Output is restraintmatted rectifyly (matches case quenchedput) 0.5
4 Interrogation three
If else declarations are rectify and uniforms are explanationd 1.25
Rectify endowment fee is estimated and unfolded rectifyly to couple decimal 1.25
Output is restraintmatted rectifyly (matches case quenchedput) 0.5
5 Interrogation filthy
Uniform N explanationd similar to primary digit in learner ID 0.5
N customer fawns, touch phones and burdens are interpret in a loop 1
Program style -XYZ Courier Employment Application Program- stereotypeed 0.25
Endowment fees stereotypeed restraint full customers 0.25
Medium burden of packages and full entirety endowment fee calm are estimated and stereotypeed rectifyly to couple decimal settles
Simple statistics issues including the treasures of package in the restricted burden season are rectifyly chroniclesed and unfolded 1
Output is restraintmatted rectifyly (matches case quenchedput) 0.5
6 Interrogation five
Rule implementation (uses a parameter) 0.5
Dollar (double) treasure reappeared from rule rectifyly 0.25
Rule cfull rectify (uses an topic) 0.5
GUI grateful missive 0.25
Strings are interpret rectifyly from GUI Input dialogs 0.25
The package burden interpret rectifyly from GUI Input dialog and applyed to an integer
N customer fawns, touch phones and burdens are interpret in a loop 0.25
Apex and incompleteness treasures of endowment fee are estimated and stereotypeed rectifyly to couple decimal settles.
Dialogs show as per restrictedation (matches case quenchedput) 0.5
7 General
Rectify improves suggestted including marks and fawns (zip and Word) 0.5
Merely techniques practised during weeks 1-5 and restrictedation are explanationd 0.5
8 Communication
Communication delivery and dilates including how covet the programs took to educe and any problems encountered
Mitigate shots of experimenting and annotations 0.5
COIT11222, 2019 Term Couple – Page 12 of 13

~~~For this or similar assignment papers~~~