Experimental Report III && fifth weekly summary

1. Known string: "this is a test of java" required to do the following requirements :( source code, the results screenshot).

The number of letters in the string s appears ① statistics.

The number of neutrons ② string string "is" appears in the statistics.

The number of words in the string "is" appears ③ statistics.

④ achieve reverse the string is output.

Experiment code:

 

 operation result:

 

 2. Write a program, using the following algorithm to encrypt or decrypt the English string input by the user. It requires source code, the results screenshot.

Experiment code:

 

operation result:

 

 3. Given the string "ddejidsEFALDFfnef2357 3ed". The output string in the number of capital letters, lowercase letters count, the number of non-English letters.

Experiment code:

 

 operation result:

 

 Fifth weekly summary:

 

The main study of the inheritance: for the extends keyword

 

 This figure good introduction to the inheritance, the subclass can have only one parent, only multilayer inheritance, not multiple inheritance;

 

 

 

 There is a subclass can not access private members of the parent class, but not private class method of the parent class by setter and getter access;

There is the need to call the constructor of the parent class before the subclass is instantiated to create their own construction methods;

Code Lab:

 

 This week summed up so much.

Guess you like

Origin www.cnblogs.com/hhwcg/p/11590680.html