Use of strings 1

  • docx
  • 02.05.2020
Публикация на сайте для учителей

Публикация педагогических разработок

Бесплатное участие. Свидетельство автора сразу.
Мгновенные 10 документов в портфолио.

Иконка файла материала Use of strings 1.docx

Long term plan unit:

School:

Data:

Teacher’s name:

Class:

The number of attendees:

absentees:

Lesson theme

Use of strings

Learning objectives that are achieved in this lesson (Subject Programme ref)

Use of procedures and functions for processing strings

Lesson objectives

Use of procedures and functions for processing strings

Evaluation criteria

Knowledge

·     Know what is string

 

Understanding

·     Describes declaration and initialization of strings

 

Application

·     Write code for processing the strings using functions

·     Write code for processing the strings using procedures

 

 

Language objectives

 

Student is able to describe the String type used in C# programming language.

For instance, to work with strings one have to include System namespace reference to program’s code .

Also, student can justify the purpose of function and procedure

Vocabulary and terminology specific to the subject:

string, string operators, comparing stings, symbols of string

Useful expressions for dialogs and letters:

Well, the variable of string type is created by … .

For example, assignment of some value to string variable   … .

Obviously, the stings used for the wide variety of cases like  … .

 

Cultivating values

 

 

collaboration, mutual respect, academic honesty, perseverance, responsibility, lifelong learning

Cross curricular links

English, Math

Prior knowledge

 

Programming basics

During the classes

Planned stages of the lesson

Planned activities in the classroom

Resources

Beginning

5 min

 

 

1.      Greetings

2.      Starter

(C) What happens in the result of execution of this code snippet ?

    3. Announcement of topic and LO

   Students asked to think about Evaluation Criteria(EC) for LO to work it out (official EC is supplied)

3.      Vocabulary

4.      Useful expressions for dialogs

 

 

 

Slides 1-4

Middle

 

 

     15 min

 

 

 

 

 

 

 

 

 

 

 

 

 

15 min

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3 min

Task 1

Action: practice

Purpose: introducing to declaration and initialization of strings in various ways

Description:

Teacher’s activities:

Student’s activities:

Explains the   task and spreads the handout with code.  

 

 

Creates a procedure with

the code in handout and calls that procedure from main program

 

Evaluation:

Evaluation Criteria

Descriptors

Write code for processing the strings using procedures

·         creates procedure for string data

·         calls procedure from main program

 

 

Task 2

Action: write a program

Purpose: learn how to concatenate two strings

Description:

Teacher’s activities:

Student’s activities:

Explains the task

 

Before starting the task, presents on slide and discusses with students the evaluation criteria

 

(I)  writes a program where a  string is passed from main program to procedure

 

 

 

Evaluation:

Evaluation Criteria

Descriptors

Write code for processing the strings using procedures

·         creates procedure that has a part of string

·         calls procedure from main program

·         passes sting to procedure from main program

·         procedure outputs the concatenated string

 

 

Differentiation:  The students who finish earlier have to develop the program by adding the new sentence ‘So, today I won’t go for swimming.’. Students must use a loop to append a single word each time, so procedure is called several times.

Feedback: Teacher makes comments or correction when necessary

 

Summary

Questions:

What is the string in C#?

How to declare string variable?

How to initialize string variable?

 

 

Handout 1

Slides 6

Appendix 1

 

 

 

 

 

 

 

 

 

 

 

Slide 7

Appendix 2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Slide 8

End

2 min

Learners reflect at the end of the lesson:

Where is I am? (Blob tree)

Slide 9

Differentiation - how do you plan to provide more support? What tasks do you plan to put before more able learners?

Evaluation - how do you plan to check the level of mastering the material by learners?

Health and safety practices


Дифференциация может быть выражена в подборе заданий, в ожидаемом результате от конкретного ученика, в оказании индивидуальной поддержки учащемуся, в подборе учебного материала и ресурсов с учетом индивидуальных способностей учащихся (Теория множественного интеллекта по Гарднеру).

Дифференциация может быть использована на любом этапе урока с учетом рационального использования времени.

Use this section to record the methods that you will use to assess what students have learned during the lesson.

Health-saving technologies.

Used body and physical exercises.

Points applied from the Safety Rules in this lesson.

Reflection on the lesson

 

Were the goals of lesson/ learning objectives realistic?

Have all the students reached the LO?

If not, why?

Is the differentiation done correctly in the lesson?

Were the time stages of the lesson sustained?

What were the deviations from the lesson plan and why?

Use this section to reflect on the lesson. Answer the most important questions about your lesson from the left column.

 

Overall assessment

 

 

What two aspects of the lesson went well (think about both teaching and learning)?

1:

 

2:

 

What could help improve the lesson (think about both teaching and learning)?

1:

 

2:

 

What I found during the lesson related to the class or the achievements / difficulties of individual students, what should I look for in subsequent lessons?

 

Appendix 1

 (handout 1)

Declaring and Initializing Strings

// Declare without initializing.

string message1;

 

// Initialize to null.

string message2 = null;

 

// Initialize as an empty string.

// Use the Empty constant instead of the literal "".

string message3 = System.String.Empty;

 

//Initialize with a regular string literal.

string oldPath = "c:\\Program Files\\Microsoft Visual Studio 8.0";

 

// Initialize with a verbatim string literal.

string newPath = @"c:\Program Files\Microsoft Visual Studio 9.0";

 

// Use System.String if you prefer.

System.String greeting = "Hello World!";

 

// In local variables (i.e. within a method body)

// you can use implicit typing.

var temp = "I'm still a strongly-typed System.String!";

 

// Use a const string to prevent 'message4' from

// being used to store another string value.

const string message4 = "You can't get rid of me!";

 

// Use the String constructor only when creating

// a string from a char*, char[], or sbyte*. See

// System.String documentation for details.

char[] letters = { 'A', 'B', 'C' };

string alphabet = new string(letters);

 

Handout 2

static void Concatenation(string s2)

            {

          

            string s1 = "Morning is ";

            string s3 = string.Concat(s1, s2);

            Console.WriteLine(s3);

            Console.ReadLine();

            }

       

 

        static void Main(string[] args)

        {

            string message3 = "rainy.";

 

            Concatenation(message3);

          

        }

 

 

 

 

Links:

1.      https://books.google.kz/books?id=_AyCDwAAQBAJ&pg=PT152&lpg=PT152&dq=Use+of+procedures+and+functions+for+processing+the+strings+in+c+sharp&source=bl&ots=_8UzPgU0XS&sig=ACfU3U14ahT5Gh0nOiWZRdAv3GnJZTysKA&hl=ru&sa=X&ved=2ahUKEwiSmZDorYPgAhVLFCwKHfC-ApQQ6AEwBXoECAQQAQ#v=onepage&q&f=false

2.      https://www.c-sharpcorner.com/UploadFile/736ca4/strings-in-C-Sharp/

3.      https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/strings/

 

 

 


 

Скачано с www.znanio.ru