Question: TITLEFile access Array Access User - defined function Sale Product HOW TO DO PROJECT * From now and on yourLastName will be changed to your
TITLEFile access Array Access Userdefined function Sale Product HOW TO DO PROJECTFrom now and on yourLastName will be changed to your last namYour program should change Martinez to your last name.Your program should change LUIS MARTINEZ to your name.Change Mary Lane to the name of user who is using the Investment Application entered from the keyboard.Write the file name as the first comment line at the top of the program.After running your program, get the picture of the output window from your program with your name on to paste at the bottom of the pseudocode to turn inStep: Read the requirement of each part; create UML of data type class and write the pseudocode in a word document and then save it with the name as PROJECTpseudoCodeyourLastName Step: start editor for example eclipse create the project with the following project name: Part: SPPROJECTyourLastName add data type class and driver class: data type class SPProductyourLastName and driver class SPSaleProductApplicationyourLastName Step: read instruction in part provide UML for data type class and write the pseudocode or draw the flowchart for main then write the code for data type class and driver class Step: compile and run the programStep: debug if there are any errors to complete the program PROJECT REQUIREMENTDATA TYPE CLASSClass SPProductyourLastNameprovide UML before writing the codeprovide the datatype class that is about Product The class SPProductyourLastName only holds The int array stores the numbers of units of different product types that the customers order and the following methods:Noargument constructor and parameterized constructorThe method to calculate the money charged on each size of each product modelThe method to calculate the subtotalThe method to calculate the tax tax rate The method to calculate the total charge Method to build up the output string for the receipt or the report in the following format: This is the receipt of one transaction This is the report of the day This is the report of the month: This is the report of the year:The method writeToFile to build one line to write to the output file: dayFile, month file year file in the following format:In the day file:transactionNumber numberUnitOfModelA numberUnitOfModelB numberUnitOfModelC numberUnitOfModelD In the month file:month numberUnitOfModelA numberUnitOfModelB numberUnitOfModelC numberUnitOfModelD In the year file:month numberUnitOfModelA numberUnitOfModelB numberUnitOfModelC numberUnitOfModelD NOTE:transactionNumber is in the format: day is in the format month is in the format DRIVER CLASSClass SPSaleSPProductApplicationWrite the pseudocode before writing the codeThe project need the following constants: static final float MODELAPRICE f;static final float MODELBPRICE f;static final float MODELCPRICE f;static final float MODELDPRICE f;static float price MODELAPRICE, MODELBPRICE, MODELCPRICE, MODELDPRICE;static final float TAX f; The company asks for the application to allow users can do the following tasks:SPSaleProductSPApplicationMartinez.cpp SP COMPANY MENU LUIS MARTINEZToday: Sale SP ProductPrint Day Sale ReportPrint Month Sale ReportPrint Year Sale ReportExitEnter a number to to select a task or to exit: The application allows users to enter a number to select a task to work on After finishing one task, redisplay the menu to allow users to select other tasks to continue working only terminate when users select TASK: SALE PRODUCTThe users select from the main menu to select the task for Sale ProductDeclare an int array UnitsModel size to store the number of units of product models that users order whereUnitsModel stores the number of units of product model AUnitsModel stores the number of units of product model BUnitsModel stores the number of units of product model CUnitsModel stores the number of units of product model D Display the list of the product models to allow users to select the product models SPSaleProductApplicationMartinez.cppPRODUCT MODELS MENU LUIS MARTINEZToday: SALE PRODUCT:Model A $Model B $Model C $Model D $ExitEnter to select the product model or to Exit: When users select a model, display the message to ask for the number of units the users order and store the number of units in the array UnitsModel. You should manage the program to add up the numbers of units of the same model if the users select the same model more than one time. Create the object of data type class SPProductyourLastNname to pass array UnitsModel and array price.Using the object to access the method of the data type class to print the receiptOpen the dayFileMMddyyyytxt to write.Using the object to access the method writeToFile to get a string to write one line to the file dayFileMMddyyytxt in the format:transactionNumber numberUnitOfModelA numberUnitOfModelB numberUnitOfModelC numberUnitOfModelD TASK: PRINT DAY REPORTAsking for the file nameCheck if the file existsIf file exists, open file to readUse the loop to read the input file:On each line of the file:read one line where each line store information: transactionNumber numberUnitOfModelA numberUnitOfModelB numberUnitOfModelC numberUnitOfModelDsplit information into itemsskip the first one, store the next items to an int array UnitsModel size create the object of data type class with the array UnitsModel and the array priceUse the object to access the method to get the report and display the day reportopen the monthFileMMyyyytxt to writeUse the object to access the method writeToFile to get a string to write to the file monthFileMMyyyytxt in the format:Day numberUnitOfModelA numberUnitOfModelB numberUnitOfModelC numberUnitOfModelD TASK: PRINT MONTH REPORTDo the same what you did in task with the file monthFileMMyyyytxt to get the information for the array UnitsModel, then create the object with the array UnitsModel and the array price and access the method of data type class to print the month report.Also, open yearFileyyyytxt to write and use the object to access the method writeToFile to get the string to write to the yearFileyyyytxt in the following formatmonth numberUnitOfModelA numberUnitOfModelB numberUnitOfModelC numberUnitOfModelD TASK: PRINT YEAR REPORTDo the same what you did in task with the file yearFileyyyytx to get the information for the array UnitsModle, create the object with the array UnitsModel and the array price and access the method of data type class to print the year report HOW TO TURN IN THE LABATTENTION: Compress each project folder into a file zip or a file rar. that includes source files and execute files.If you do not have the source file and execute file, your lab gets pointsIf you do not provide file class of the part, you only have half of the max score of the part You should turn in the following files:ProjectpseudoCodeyourLastName.docx including UML, Pseudocode, and the output pictures SPProjectyourLastName.zip including the following files: SPProductyourLastName.java SPSaleProductApplicationyourLastName.java SPProductyourLastName.class SPSaleProductApplicationyourLastName.class
Day file
Month file
Year file
Both data class and driver class
Need complete program java
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
