please look at the attached file
GENERAL INSTRUCTIONS This assignment should be done individually. The assignment consists of writing a program and demonstrating it. Note this purpose of this assignment is to learn by doing the 5 marks are a relatively small reward for effort. This assignment is marked by demonstration. Some resubmissions will be allowed. I encourage all students to aim for 5/5 for this assignment. Tutors will have marking sheets for the assignment from the start of week 5. One purpose of the demonstration is for other students to watch, learn and become inspired (if you have a RAP and public demonstrations are hard for you, please email me. While we will not systematically look at code, I (or you tutor) may well ask to see your code and ask you to explain your code as a check that you wrote the assignment yourself. Tutors can deduct marks if you cannot satisfactorily explain what you claim to have written yourself. It is intended that you build the assignment over the weekend or in the evenings. It’s likely that a two-hour tutorial is not long enough for a beginner programmer to complete the assignment to a satisfactory level. Students can work at different levels according to their preferences; the grade you will achieve will depend on functionality of the submitted program as shown in the marking rubric later in this document. You can ask for help in the tutorials, and hints, but nobody can do assignment for you. Assignment Briefing: The wonderful Elon Musket, in the nation of ‘Tisisoddistan’ has opened a robotic distribution centre called ‘Bakov’ to distribute parts for his Space-hex rockets. In this assignment assume you are writing a program as part of the ‘Bakov’ distribution centre, which is in turn is part of Elon’s vast business empire. Your tiny part is to write a program that takes orders, and then follows up with an invoice to the wholly owned subsidiary company that requested the part. Optionally it also sends instructions to the robots (at this stage we will just use a printout to do this in a robot picking slip format). As part of the convoluted tax law in Tisisoddistan (which I made up for the assignment) all parts sold are charged at the shown price plus a 10% VAT. The VAT is a Value Added Tax like Australia’s GST, but administered differently. However, it turns out that one subsidiary the “Blue Fish Space Company” is a registered charity and gets no VAT charged. Also, the company ‘Elon Cannon Personal’ gets a 1% discount on all goods before tax is charged. To complicate things the company ‘Eloan Credit Finance’ gets a 1.5% discount after tax. Elon also wants to send people (real live breathing people – presumably suicidal ones) to Mars (yes mars a planet totally inhospitable to life). He has started a special company to do this called ARRG (Actually Really Ready to Go), which must bid for work. So, to be sure it’s the lowest price, Bakov offers a 22.5% discount before tax on any order that has a before tax value of over $14,500. The good news is that the company NAASA (standing for Not Actually A Space Agency) is dealt with in a standard way. No one can order more than 5 of any products in one order. Orders of 0 or less are disallowed and assumed to be errors. Here is a helpful table to show the various tax and discount statuses of the different subsidiaries. Company Deal Information Company Id Full Name Discount Discount applied Pay Tax Pickup Bay Id BFSC Blue Fish Space Co 0 NA No MERCY ECP Elon Cannon Personal 1% Before Tax Yes KIT ECF Eloan Credit Finance 1.5% After Tax Yes MERCY NAASA NAASA 0 NA Yes MERCY ARRG ARRG 22.5% *1 Before Tax Yes KAT NOTE 1 – Company ARRG only gets the generous discount on orders over $14,500 otherwise it gets 0% discount. The warehouse has only 5 products as shown below in the product table Product Code Description Price $ Warehouse Location FENG Fast Engine 12,124.50 ENG-894 SENG Small Engine 7,000.00 ENG-895 FT Fuel Tank 7,000.00 FT HGA High Gain Antenna 7,003.11 ANT-20 LWA Light Weight Antenna 4,950.20 ANT All data is based in reality (i.e. it’s inspired by actual information – sorry not a lot of reality), with names and values changed to protect the relevant humans/financial institutions. The problem is heavily simplified to make it suitable as a Year 1 assignment. You program needs to have the following options in a menu which loops Option Effect Q Quits the program C Prints out the table Company Deal Information for testing (which should be the same as the table above, in same order and general format, and a % sign after rate) W Prints out the warehouse product table for testing (which should be the same as the table above, in same order and general format) O Process an order This will need to input: · the company Id that’s ordering parts; · the product code; and · the number of items ordered. The input fields that are needed to be checked are as follows: · the company Id must be valid · the product id must be valid · the number of items must be between 1 and 5 On any of the above errors exit the program after printing a suitable error message to make error handling easy. The program must then print the invoice which shows · The Company code and name · The Product Code and name · The number of products ordered · The Tax paid · The final cost of the object The invoice should look nice and be formatted at least as nicely as my example. E Explain (break down how the cost was calculated for the order) – each partial step computed and printed for the last entered order · The Company code and name · The Product Code and name · The list cost of the product · The number of products ordered · The gross price before discounts and tax · The Discount before tax (if any) · The Taxable amount · The Tax paid · The Discount after tax (if any) · The final cost of the object R This is optional for the 5th mark Print a Robot Picking Ticket (see below for format and example) A Simple example worked through NAASA orders 3 fast engines Step Description Input or Output Computation / Notes 1 The Company code and name NAASA NAASA The Product Code and name FENG FENG The number of products ordered 3 3 The list cost of the product from the table is Lookup 12,124.50 using FENG Multiply by number of products 3 * 12,124.50 = 36,373.50 The Discount before tax (if any) Lookup using NAASA 0 The Discount applied 0 * 36,373.5 = 0 36,373.5 – 0 = 36,373.5 The Tax paid 10% of 36,373.5 =3,637.35 The Tax Added to price 36,373.5 + 3,637.35 = 40,010.85 The Discount after tax (if any) Lookup using NAASA 0 The Discount after tax applied 0% discount no effect on price Compute the final cost of the order =40,010.85 Display the final cost of the order $40,010.85 Robot picking ticket That extra Mark – The robot picking ticket (to move goods from the warehouse to the pickup bay) This is a special ticket (which in this assignment is just printed to console) in a simple robot friendly format specifically: [ BEGIN JOB ] IDNumber
FromLocationTolocationproductCodecompanyCode [ END JOB ] The IDNumber is a sequential number starting at 001 and not going above 999 in this assignment it restarts at 001 for each order. (note 001 not 1) There is one line for each product ordered so if NAASA ordered 3 Fast engines it would look like this: [ BEGIN JOB ] 001 ENG-894 MERCY FENG NAASA 002 ENG-894 MERCY FENG NAASA 003 ENG-894 MERCY FENG NAASA [ END JOB ] Two more examples Step Description Input or Output Computation / Notes 1 The Company code and name ECP The Product Code and name FENG FENG The number of products ordered 3 3 The list cost of the product from the table is Lookup 12,124.50 using FENG Multiply by number of products 3 * 12,124.50 = 36,373.50 The Discount before tax (if any) Lookup using ECP 1% The Discount applied 0.01 * 36,373.5 = 363.735 36,373.5 – 363.735 = 36,009.765 The Tax paid 10% of 36,009.765 =3,600.9765 The Tax Added to price 36,009.765+ 3,600.9765 = 39,610.7415 The Discount after tax (if any) Lookup using ECP 0 The Discount after tax applied 0% discount no effect on price Compute the final cost of the order =39,610.74 Step Description Input or Output Computation / Notes 1 The Company code and name ECF ECF The Product Code and name HGA The number of products ordered 5 The list cost of the product from the table is Lookup 7003.11 using HGA Multiply by number of products 5 * 7003.11 = 35,015.55 The Discount before tax (if any) Lookup using ECF 0 The Discount applied 0 * 35,015.55= 0 35,015.55– 0 = 35,015.55 The Tax paid 10% of 35,015.55 =3,501.555 The Tax Added to price 35,015.55+3,501.555 = 38517.105 The Discount after tax (if any) Lookup using ECF 1.5% The Discount after tax applied 38517.105 * 1.5% = 577.756 Compute the final cost of the order =38517.105 - 577.756 =37,939.34843 Display the final cost of the order $37,939.35 Marking Marks Feature 0 No submission till too late (once I have gone through the answer in a lecture no more marking or re-submissions) 1 You made an effort, but it does not really work 2 It has significant errors 2.5 It’s just barely adequate – probably has a minor error or no edit checking perhaps the menu does not loop 3 It computes the correct amount – but is very untidy or has really minor errors perhaps its formatting is ragged (e.g. things don’t line up) 4 Its accurate and nicely formatted 5 Its accurate and nicely formatted and prints a suitable robot picking slip HINTS Look at the supplied code. You can cut and paste it to get company and product information. I will put an example on the web site to show this in use. Create