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 User-defined function Sale Product HOW TO DO PROJECT*From now and on yourLastName will be changed to your last nam*Your 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 pseudo-code to turn in.*Step1: Read the requirement of each part; create UML of data type class and write the pseudo-code in a word document and then save it with the name as PROJECT_pseudoCode_yourLastName *Step2: -start editor (for example eclipse) create the project with the following project name: Part2: SP2024_PROJECT_yourLastName -add data type class and driver class: data type class SP2024_Product_yourLastName and driver class SP2024_SaleProductApplication_yourLastName *Step3: read instruction in part 2, provide UML for data type class and write the pseudo-code (or draw the flowchart) for main(), then write the code for data type class and driver class *Step:4 compile and run the program*Step5: debug if there are any errors to complete the program PROJECT REQUIREMENTDATA TYPE CLASSClass SP2024_Product_yourLastName1.provide UML before writing the code2.provide the datatype class that is about Product The class SP2024_Product_yourLastName only holds . The int array stores the numbers of units of different product types that the customers order and the following methods:*No-argument constructor and parameterized constructor*The method to calculate the money charged on each size of each product model*The method to calculate the subtotal*The method to calculate the tax (tax rate =0.0825)*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: 0001,0002,00030009,0010,0011,0012..-day is in the format 01,02,03,29,30,31-month is in the format 01,02,03,09,10,11,12 DRIVER CLASSClass SP2024_Sale_SP23Product_Application1.Write the pseudo-code before writing the code2.The project need the following constants: static final float MODELA_PRICE =11.39f;static final float MODELB_PRICE =12.59f;static final float MODELC_PRICE =13.79f;static final float MODELD_PRICE =14.99f;static float[] price ={MODELA_PRICE, MODELB_PRICE, MODELC_PRICE, MODELD_PRICE};static final float TAX =0.0825f; The company asks for the application to allow users can do the following tasks:SP2024_SaleProductSP23_Application_Martinez.cpp SP23 COMPANY MENU - LUIS MARTINEZToday: 03/05/2023----------------------------------------------------1.Sale SP23 Product2.Print Day Sale Report3.Print Month Sale Report4.Print Year Sale Report0.ExitEnter a number 1 to 4 to select a task or 0 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 0 TASK1: SALE PRODUCTThe users select 1 from the main menu to select the task1 for Sale Product-Declare an int array UnitsModel size 4, to store the number of units of 4 product models that users order whereUnitsModel[0] stores the number of units of product model AUnitsModel1] stores the number of units of product model BUnitsModel [2] stores the number of units of product model CUnitsModel [3] stores the number of units of product model D -Display the list of the product models to allow users to select the product models SP2024_SaleProductApplication_Martinez.cppPRODUCT MODELS MENU - LUIS MARTINEZToday: 03/05/2024----------------------------------------------------SALE PRODUCT:1.Model A - $11.392.Model B - $12.593.Model C - $13.794.Model D - $14.990.ExitEnter 1,2,3 to select the product model or 0 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 SP2024_Product_yourLastNname to pass array UnitsModel and array price.*Using the object to access the method of the data type class to print the receipt*Open the dayFile_MMddyyyy.txt to write.*Using the object to access the method writeToFile to get a string to write one line to the file dayFile_MMddyyy.txt in the format:transactionNumber numberUnitOfModelA numberUnitOfModelB numberUnitOfModelC numberUnitOfModelD TASK2: 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 5 information: transactionNumber numberUnitOfModelA numberUnitOfModelB numberUnitOfModelC numberUnitOfModelD*split information into 5 items*skip the first one, store the next 4 items to an int array UnitsModel size 4.*create the object of data type class with the array UnitsModel and the array price*Use the object to access the method to get the report and display the day report*open the monthFile_MMyyyy.txt to write*Use the object to access the method writeToFile to get a string to write to the file monthFile_MMyyyy.txt in the format:Day numberUnitOfModelA numberUnitOfModelB numberUnitOfModelC numberUnitOfModelD TASK3: PRINT MONTH REPORTDo the same what you did in task2 with the file monthFile_MMyyyy.txt 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 yearFile_yyyy.txt to write and use the object to access the method writeToFile to get the string to write to the yearFile_yyyy.txt in the following formatmonth numberUnitOfModelA numberUnitOfModelB numberUnitOfModelC numberUnitOfModelD TASK4: PRINT YEAR REPORTDo the same what you did in task3 with the file yearFile_yyyy.tx 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 0 points-If 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:*Project_pseudoCode_yourLastName.docx (including UML, Pseudo-code, and the output pictures)* SP2024_Project_yourLastName.zip including the following files: SP2024_Product_yourLastName.java SP2024_SaleProductApplication_yourLastName.java SP2024_Product_yourLastName.class SP2024_SaleProductApplication_yourLastName.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 blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!