Question: Hi , I really need help with this. Please completely answer it for me so i can rate you up vote otherwise i will down
Hi I really need help with this. Please completely answer it for me so i can rate you up vote otherwise i will down vote because this is really inportant for me Below i have attached a picture of what my output should look like and all the info. Also, i need to use IntelliJ to complete this so let me know how many files should i make And name them and each code for its file please. I have created a new project on intellij and mvcapps and the i have packages minimac stoplightSim and tools so first package has these files inside Instruction as interface, MiniMac.java, ViewPanel.java, Tester.java and txt files as fib.txt less.txt logtxt tri.txt as tester code files. Second package has Stoplight.java, StoplightComponent.java, StoplightView.java, AppOanel.java and the third package has Subscriber as Interface, Publisher.java, Utilities.java and i will attach the code for these two last packages for you and i need the correct one for minimac package to get the correct output as it shown in the picture. I posted this question many time no one correctly answer it so please help me out with it Thanks! So please have the file bames as this and write and implement wverythibg for me I need the complete answer Thanks!
MiniMacMiniMac is a virtual processor with a tiny but extendable memory and a tiny but extendable instruction set.Heres a screenshot of the MiniMac user interface:A screenshot of a computerDescription automatically generatedThe view panel on the right contains two lists javaxswing.JList The top list shows the contents of memory. The bottom list shows the program currently being executed. The control panel on the left contains three buttons javaxswing.JButton The first button prompts the user for a program to parse:A screenshot of a computer programDescription automatically generatedThe second button executes the program. The third button resets all memory cells to These commands are duplicated under the Edit menu. The Help menu explains each command. The File menu contains the items: New, Save, Open, and Quit.The MiniMax memory is an array of integers:int size ;Integer memory new Integersize;A MiniMax program is a list of instructions. An instruction pointer ip indicates the position in the list of the next instruction to be executed.GrammarHeres the instruction set grammar note: ~ means followed by and all unquoted tokens are integers:load :: load ~ location ~ value memorylocation valuehalt :: halt terminates the programadd :: add ~ src ~ src ~ dest memorydest memorysrc memorysrcmul :: mul ~ src ~ src ~ dest memorydest memorysrc memorysrcbgt :: bgt ~ location ~ offset if memorylocation ip offsetblt :: blt ~ location ~ offset if memorylocation ip offsetloop :: loop ~ count ~ instruction executes instruction count timesA block is a list of one or more instructions separated by semicolons and bracketed by curly braces:block :: ~ instruction ~ ; ~ instruction ~ Executing a block sequentially executes each instruction in the blocks body.For example, the program shown in the screenshot computes kn where n is stored in memory The base, k is stored in memory In this case k n was and the result, is stored in memory Memory is the amount to decrement memory each time the result is multiplied by kDesignHeres the design of MiniMac:A diagram of a programDescription automatically generatedParserHeres a partial implementation of MiniMacParser.java. Note that it is a utility class aka singleton all of its methods are static.TestingImplement and test the following functions in MiniMac:Trin n stored in a file called triFibn nth Fibonacci number stored in a file called fibLessn mn m: true and falseLogn m where m n and n mIn each case the output, fn should be stored in memory and the inputs should be stored beginning in memoryHints The MiniMac is a publisher and the view panel is its subscriber. Each time memory is updated or a new program is set, MiniMac notifies its subscribers The control panel is the action listener for its buttons. It navigates to the MiniMac and calls the appropriate procedure execute and clear Parsing is more complicated. The control panel must prompt the user for a file name, read the file as a string then pass the string to MiniMaxParser.parseprogram It then sets the MiniMac program to the parsers output, which causes a subscriber notification. Suggestion: ask ChatGPT how to read a text file in Java Ask ChatGPT for a simple example of how to use a JList.
ask for update so i can afd the codes for you or please answe the minimac correctly also if you ask for update i can share the files picture with you.
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
