Pair programming (additional jobs)

Source: Internet
Author: User

Pairs of members: Jin-zhi-Huan

One, encapsulated into a DLL

Since I didn't build the DLL at first, it was inconvenient for the other person to use my module.

The specific build DLL steps are as follows:

1. After writing the core, project-Properties-Output, select "Class library" (e.g.)

2. Create a new project and add references to add the DLL files that you have written. Can be used by using a DLL name.

To facilitate the use of my DLL, I have simply written an API.

void setting (int numofq, int rangeofnum, int NUMOFOP, BOOL Havemulti, BOOL havenegative, bool havedecimal);
parameters: Numofq: Number of issues generated
rangeofnum: The range of absolute values of integers in the title, and also the range of the absolute values of the denominator
NUMOFOP: The number of operators in each topic.
havenegative: Whether the topic contains negative numbers.
havedecimal: Whether the title contains a score.
effect: Sets the parameters of the problem generator.

String Calc (string s);
Parameter: s: The problem that needs to be calculated. Note that the format requires a space between each number and parenthesis and the operation symbol.
Effect: Calculates a topic and returns the calculated result of the Stirng class.

void Generate ();
Effect: Generate the title and answer file in the current directory. Called Exercises.txt and Answers.txt, respectively.

void Grade (String A, string Q);
Parameters: A: The path to the answer file.
Q: The path to the title file
Effect: Read the answer and title file and generate score file Grade.txt based on and answers and questions.

My interface has four methods defined, the other side of the interface has 10 methods.

Second, their own interface and test plus the other side of the DLL

So, I made the following changes in the interface program:

In the Build button:

Calc Method We are exactly the same, so the calculation button does not need to be modified

In the evaluation button:

Third, their own DLL plus the other side of the interface and testing

Because the other side did something I do not have, so when using my DLL, some features can not be implemented.

For example, the other side can choose the path to generate code.

So I added this feature to my own code to implement it.

As far as testing is concerned, because we have only tested the core method, I just need to delete the methods I don't have, and modify the order and the number of variables in the test section.

Pair programming (additional jobs)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.