The SpaceW Monthly Planner
GENERAL INSTRUCTIONS
This assignment should be done individually. The submission should be made as a single zipped file including a BlueJ project and submitted in Canvas.
Students should be aware that I may do some kind of plagiarism check.
Note: code must be in BlueJ; code written and submitted in any other Java environment may not be able to be marked.
This assignment is marked as a submission of a single zip file. It should be submitted to Canvas by its due date (see above). You need to submit:
- The java program code (working or not) as a BlueJ project directory;
- A test plan;
- Documented results of your test plan;
- Evidence of you running a number of mandatory, well documented, test runs (e.g. screen shots); These are the results of mandatory test runs (test runs required are detailed in a separate document);
- A short reflection report on what you learned;
- An optional feedback (of the unit). Just a paragraph to me which is not marked;
- Remember:” a single zipped file including a BlueJ project and submitted in Canvas.”
There are no resubmission options for this assignment.
This assignment is marked after semester ends in the exam period; resubmissions will NOT be possible.
You can ask for help in the tutorials, PALS, and hints, but the assignment should be your own work.
Assignment Briefing:
The wonderful company, SpaceW, is a fictional company that makes its money by providing orbital services (aka, blasting rockets into space). They are ramping up spaceflights; to help them they need an invoice program that can produce a one off invoice, a monthly invoice and a combined launch schedule for both launch sites (See example output).
The one-off invoice is similar to MT1 – but with client name and contact printed and including a launchpad fee if necessary (See example output below). The input for this option is to come from the keyboard and the program must not crash, no matter what rubbish is typed in. Obviously incorrect inputs should generate errors.
The Monthly invoice is a summation of all the launches for a given client in each given month. The input for this option is to come from an input file with one line per launch, this file may have trailing blank lines.
The Monthly launch schedule is a summary listing of the launches for a given month and should include all launches for both particular launch sites of that month for one customer. Extra points are to be awarded if the launch schedule is in date order (chronological order).
Space vehicles can be launched into two standard orbits: LEO (low earth orbit), GTO (Geosynchronous Transfer Orbit). NESA tracking costs must be arranged for GTO orbits and shown on the invoice ($120,000).
You program needs to do the following (also see marking rubric below)
- Show a small menu with 4 options (console input)
- Produce a one-off invoice;
- Produce a monthly invoice;
- Produce a launch schedule; and
- Exit
- Students may code two additional options if they want
- Produce a sorted launch schedule; and
- Display a teddy bear (see marking rubric – safety net marks)
- If monthly invoice or launch schedule is selected it should process a file. The file is the monthly orders file for a given company. Several of these input files will be provided for testing and mandatory testing. (see format below)
Monthly-Orders format (input file) comma separated
| Field Number | Name | Contents |
| 1 | Date | The date of the order in format dd/mm/yy |
| 2 | Client | The client Id (a string of up to 10 characters) |
| 3 | Service | From the service codes in MT1 (eg ORBL, ORBLH etc) |
| 4 | Orbit | LEO, GTO |
| 5 | Payload value | 10,000 to 900,000,000 |
| 6 | Launch Site | LC40 or KSC |
| 7 | Global warming | Y or N |
Monthly order file (will be sorted in date order with more than one order in a day)
Below is the test file Oct2020.txt (which I supply for your testing)
| 18/10/20,ESAA,ORBL,GTO,3900000,KSC,N 20/10/20,ESAA,ORBL,LEO,2200000,KSC,Y |
To display client name and contact on the invoice the students need to get these details from the table shown below. I provide a sample class for this, students do not need to use it (you could instead use a case statement or if statement(s) – it’s up to you).
Customers table
| Code | Name | Contact name | Address |
| ESAA | Europe Systems Alternative Agency | Jean-Claude Junxer | 23 Razor Road Belconnen ACT 2617 |
| NASHA | National Air Space Hash Agency | Jimmy Briden | 2 Mashup Drive Bruce ACT 2617 |
| ASA | Aussie Space Agency | Megan Clock | Flat 31/a, Bax Units Stix St, Marble Bar, WA 6760 |
| TICK | Tick Incorporated | Mark Watson | 87 Race Drive Bathurst, NSW 2795 |
| BINC | Byer Private Space Incorporated | Marilyn Hewson | 212 Webly Drive, Canowindra, NSW 2804 |
| CODC | Corporate Space Trust | Zhang Chen | 212 Scorch Drive, Beltana, SA 5730 |
| MARZ | The Mars Gen Inc | Cool Dude | 26 O’Conner’s Road, Werribee South, VIC 3030 |
Exact spelling and punctuation in the address lines may vary in supplied code. Students can use either version.
SpaceW Launch services
| Service Code | Description | Cost US $ | Notes |
| ORBL | One satellite to low earth orbit weighing less than 6 metric tonnes; or One satellite to GTO weighing less than 4 metric tonnes | 62,000,000 | |
| ORBLH | One satellite to low earth orbit weighing less than 26 metric tonnes; or One satellite to GTO weighing less than 18 metric tonnes | 90,000,000 | |
| ORBC1U | One micro satellite 10x10x10cm (cubesat size 1) Ride Sharing with another payload in a similar orbit. | 500,000 | *2 |
| ORBC2U | One micro satellite 10x10x20cm (cubesat size 2) Ride Sharing with another payload in a similar orbit. | 1,000,000 | *2 |
| ORBC3U | One micro satellite 10x10x30cm (cubesat size 3) Ride Sharing with another payload in a similar orbit. | 1,400,000 | *2 |
| ORBC6U | One micro satellite 10x20x30cm (cubesat size 6) Ride Sharing with another payload in a similar orbit. | 2,000,000 | *2 |
| Note | ||
| *2 | Free Teddy Bear | |
| *3 | Payload values are rounded up to the nearest million E.g. payload value 650,001 would count as 1 million E.g. payload value 1,00,001 would count as 2 million E.g. payload value 7,250,000 would count as 8 million |
Additional Information:
The generous ‘trumpcards’ government has deemed that a 13% of payload cost ‘earth sciences tax’ will apply to all spaceflights with payloads valued at more than $1,000,000 that include satellites whose job it is to monitor Global Warming indicators.
Promotional offer: All cubesat space flights get a custom signed space suited 3-foot-tall teddy bear free of charge.
Any satellite launch that is to GTO requires rental of the Nearly Extinct Space Agency (NESA) tracking stations who charges a $120,000 fee.
Unlike MT1 there is no additional $300,000 if a cubesat needs a GTO orbit.
Payload values can be as low as 10,000 and as high as 900,000,000
The system works in whole dollars; values should be rounded to the nearest dollar.
There are two possible launch sites specifically: LC40 or KSC. There is an additional fee of $130,000 to use the KSC, paid to NESA but invoiced by SpaceW.
All non-numeric values must be input edited so incorrect codes cannot be entered.
All input numeric fields must be range edited, and errors handled. For this assignment the input of non-numeric data into numeric fields WILL NOW BE tested. This also includes data read from the input files
- g. we may test payload vale of ‘9000’ which would be too low, but WILL NOW also test payload value of ‘fred’
The system should ask different questions depending on the service chosen and the value of the payload.
- For example, service ORBL with a payload value of 6,000,000 needs to ask:
- Orbit GTO or LEO
- If it’s a ‘Global Warming Monitor’
- The launchpad
- For example, service ORBL with a payload value of 900,000 needs to ask:
- Orbit GTO or LEO
- The launchpad
The system must also loop – to do more than one quote in a single run, you don’t need an exit on every input – but you must have a way to cleanly leave the system, with a message “** Program ending **” or something similar.
Where required, your program should ask for the name of the input file (e.g. “Oct2020.txt”), be able to locate it and read it into your program.
To make your life a bit easier you can assume the date format in the file to be dd/mm/yy so you may get 01/07/19 but you won’t get 1/7/19. Which makes sorting and editing a bit easier.
Also to save you coding extra read file loops, you can (but don’t have to) require the Launch Schedule and Monthly report to be run in a specific order. (this is most use to students doing the sorted launch schedule option).
The sorted launch schedule must sort on launch pad and date. I put a space line between the two launch pads (ie it’s a schedule for LC40 then a schedule for KSC).
BASIC Tests and Example Invoice
Example Invoice
Launch Date: 23/10/20
Client code: CODC
Service code: ORBC6U
Orbit: GTO
Value Of Payload: 1,450,000
Launch Site: LC40
Global Warm Satellite: Y
—————————————————————————————————————
To: Corporate Space Trust
Attention: Zhang Chen
Client Id: CODC
SpaceW Service Invoice
| Launch Date | Orbit Fees | Site Fees | Global Warming Tax 13% | Service | Service Cost | Total |
| 23/10/20 | $120,000 | $0 | $188,500 | ORBC6U | $2,000,000 | $2,308,500 |
| $2,308,500 |
—————————————————————————————————————
MANDATORY TESTS
You need to run the following 6 mandatory tests:
| Test | |
| 1 | a one-off invoice for : Launch Date: 23/10/20 Client code: BINC Service code: ORBLH Orbit: GTO Value Of Payload: 1,900,000 Launch Site: KSC Global Warm Satellite: Y |
| 2 | monthly invoice for file mandA2020.txt |
| 3 | monthly invoice for file mandB2022.txt |
| 4 | launch schedule for file mandA2020.txt |
| 5 | launch schedule for file mandB2022.txt |
| 6 | Launch report for file mandc2023.txt (this has deliberate errors in it) |
Files I provide:
I provide the following files:
Customer.java
CustomerList.java
CustomerListTestClass.java – my testing code, you don’t actually need it
Menu.java
Test files: oct2020.txt, jan2022.txt, Err2020.txt
Mandatory Test Files: mandA2020.txt, mandB2020.txt, mandC2020.txt
Getting started:
- Read the assignment several times over to get a feel for the assignment, it’s mainly string and error handling with relatively little math.
- Start with the menu program. Create the basic three option menu where each option just prints a line that says – option … selected. When I did this I did a separate method for each option which helps keep code manageable (it’s not necessary to do this).
- Check exit works and that the menu loops. If you can’t get this far talk to your tutor or go to PALS to get help.
- Now create a good test plan (this is worth up to 9 marks – easy marks in my opinion), you should create some new test case files.
- Because you did MT1 you will note that the option “one-off invoice” is very close to MT1 in its general nature – so do it first, test and document the first Mandatory test. If you can’t work out how to use customer list watch the first part of the week10 lecture echo or code a switch statement.
- Next do the unsorted launch schedule. This not much more that a read and print file loop so should pose little problem to code. Do the next two mandatory tests and document them
- If you are really “%&$#?@!” for time then do a reflection report make sure you have a good test plan (with extra documented test cases), zip up and send it in and pray that it all works cause you have no spare marks, but you could pass the assignment. (I don’t recommend this but stuff happens).
- Ok so you want a better chance of a pass, then do the monthly invoice and the next 3 mandatory test cases (plus your designed test cases), this has fussy formatting but is actually no harder than a mix of the file loop from launch schedule with the calculations from the one-off invoice re formatted and printed with formatting.
- Everything else is really optional but gets you the last few marks
- Code the sorted launch report (in my opinion this is more fun and easier than the teddy bear).
- Code the UCCanvas teddy bear
- The assignment is done don’t screw it up now! Write a reflection report making sure you have a good, well documented test plan (with extra documented test cases), zip up and send it in. If you did it well you should get 30 out of 30.
HINTS: and help
HINT1: If you are using an array you can populate the array in the launch schedule or monthly report and require that report to be run first (this is to reduce the file read loops you need to code).
HINT2: To document a test case: take a screen shot (I use alt print screen, then paste in windows).
HINT3: If you don’t want to use arrays, the sorted launch schedule is going to be ‘really challenging’ you may want to avoid it. Also you will need to code two file loops and both launch schedule and monthly invoice will probably ask for a file name.
HINT4: The UCCanvas teddy bear could be ascii art but it can’t be ‘really small’. Let’s say a minimum of 6 lines of asci art if you do it that way.
HINT5: here are three code fragments to help with date editing:
SimpleDateFormat df;
…………………..
Date ddd=new Date();
boolean ok=true;
try
ddd = df.parse(ss[0]); // date
catch (ParseException e)
System.out.println(“File input error>> Date Parse Failed”);
ok=false;
……………………………..
if (ok)
launchDate=ss[0];
lDate=ddd;
else
launchDate=””;
lDate=new Date(0);
return;
Marking Rubric (Marked out of 32, but marks above 30 truncated to 30 marks)
| Marks | Feature |
| 9 | Good test plan and evidence of testing Test plan should include: · tests from the assignment · mandatory tests · additional tests created by the student · the results of running the tests · err2020.txt in plan A program must be supplied but it does not have to work particularly well to get these marks. |
| 7 | Your program code, accuracy, functionality and formatting If the program wont compile or run you get 0 here One-off invoice, Launch schedule and Monthly invoice should work (ie be accurate) to get most these marks, comments and program structure is also marked here |
| 1 | You used arrays – more than in string split |
| 1 | It handles errors in the input file (file err2020.txt) |
| 1 | You built a class to hold data about the launch |
| 1 | Sorting the launch report |
| 2 Possible safety net points | A menu option to draw a teddy bear using UCCanvas – be creative This does not change the maximum marks to above 30 but is a ‘safety net’ because we all make mistakes. |
| 3 | Reflection Report – (half a page to one page in length, an honest appraisal of how you did the assignment , what you learned and what you would do different if you had to do it again) |
| 6 | Results of 6 mandatory tests 1 for each correct and documented test |
| -1 to -30 | Fails additional tests not provided to students but run by marker. This is mainly to catch cases where the students submitted testing evidence is not produced by the program submitted; or there is reason to believe the program is significantly faulty in some way not found by student testing. |
| -1 to -30 | The program is not supplied as a .zip file. This penalty is applied if the submission is a .tar .gz .7z .rar .arc … or other non-zip format. (-30 is assuming we can’t un-archive it) |
| -1 to -3 | Program has non-fatal significant bug |
| Maximum of 14marks for assignment | Program fatally crashes or won’t compile or is basically not working |
| Minimum of 15 marks for assignment | Program basically works and is acceptably documented with an ok test plan. |
| -1 to -30 | Program is not a BlueJ project. My tutors are not responsible for converting your project from (insert your IDE here) to BlueJ. |
| Late submission | 5% per day up to 1 week late then a mark of 0 Watch the Canvas site for late class wide extensions that may be given NOTE: The Canvas site will be open for about an extra 2 week to catch very late submissions for students on a RAP or who have medical certificates |
Example run screenshots
Teddy Bear example screen shot – will be loaded Monday or Tuesday next week
The post The wonderful company, SpaceW appeared first on My Assignment Online.