Question: (15 marks) P3: Computer Simulation Focus: OOP composition, several classes work together to achieve an objective, helper methods The objective of this lab will be

 (15 marks) P3: Computer Simulation Focus: OOP composition, several classes work

together to achieve an objective, helper methods The objective of this lab

(15 marks) P3: Computer Simulation Focus: OOP composition, several classes work together to achieve an objective, helper methods The objective of this lab will be to combine the work previously done in labs P1 and P2 in order to build our complete simulator. MEMORY Computer 0 0799 0798 0198 0499 1008 1108 0899 0909 0898 Input Device 2 3 Program Counter 5 6 7 8 9 CENTRAL PROCESSING UNIT Instruction Register Accumulator Output Device ks] rking end (A) A basic computer simulator: Using the computer information previously provided, we could deduce that the simulated computer will be represented by a new class Computer that contains at least the following Four private attributes for: - A Memory object Three Register objects, one in each category (IR, PC, and ACC) A constructor to create the above objects and initialize them . Methods that can be used to execute a program as follows * A method run () to run the program loaded into memory. This method should perform the following steps a) Load a program into the memory. For now, we will load the default program discussed in lab P1. That is, use the method LoadMemory created in the Memory class from Lab P1 to load the default program

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 Databases Questions!