Java程序辅导

C C++ Java Python Processing编程在线培训 程序编写 软件开发 视频讲解

客服在线QQ:2653320439 微信:ittutor Email:itutor@qq.com
wx: cjtutor
QQ: 2653320439
Lab: Statement and Recursion Lab: Statement and Recursion Objective In this lab you will practice manipulating Statement values by implementing and testing the static method countOfPrimitiveCalls. Setup To get started, import the project for this lab, StatementCountPrimitiveCalls, from the StatementCountPrimitiveCalls.zip file available at this link. If you don't remember how to do this, see the Setup instructions in an earlier lab. Method Open the file CountPrimitiveCalls.java in the src folder and complete the body of the static method countOfPrimitiveCalls by pasting the code you wrote for the homework into the skeleton provided. Open the CountPrimitiveCallsTest.java JUnit test fixture in the test folder and carefully review the createFromArgs method and its contract. One sample test case is provided as an example of how to test countOfPrimitiveCalls (note that it uses the input file test1.bl in the data folder). If you have questions about the test fixture, make sure to ask an instructor. Run the test fixture. If your implementation of countOfPrimitiveCalls does not pass the test case provided, you need to debug your code. It might be helpful to create new (smaller) test cases that allow you to test each individual branch in the switch statement. Add the new test cases to the test fixture and test/debug your code until you believe it to be correct. Additional Activities Implement and test the following static method. You can copy and paste countOfPrimitiveCalls and then update the contract and modify the header and the body. Implement and test the following static method. You can copy and paste countOfInstructionCalls and then update the contract and modify the header and the body.