methodological_instructions (6)

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

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

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

Иконка файла материала methodological_instructions (6).doc

Methodological Instructions

Theme: Use of strings

Aim: Use of procedures and functions for processing strings

Assessment criteria

Knowledge

·     Know how to find Length of string

 

Understanding

·     How to output the string array elements

 

Application

·     Write code for processing the strings using functions

·     Write code for processing the strings using procedures

 

Language objectives

Student is able to describe an array of string.

For instance, foreach loop operator is used to work with string array elements.

Also, student can justify the purpose of function or procedure used for processing string.

Vocabulary and terminology specific to the subject:

String element, string array, foreach

Useful expressions for dialogs and letters:

Well, to work with array of strings … .

For example, each element of string array … .

As a matter of fact, the stings are used in the wide variety of cases to  … .

 

Content (practical)

Calculate the Length of the String

 

static void strLength(string s)

        {

            int len = s.Length;

            Console.WriteLine(len);

        }

        static void Main(string[] args)

        {

            string s1 = "Computer";

 

            strLength(s1);

                      

            Console.ReadLine();

 

        }

 

Procedure

Function

static void strLength(string s)

        {

            int len = s.Length;

            Console.WriteLine(len);

        }

        static void Main(string[] args)

        {

            string s1 = "Computer";

 

            strLength(s1);

                      

            Console.ReadLine();

 

        }

 

static  int  strLength(string s)

        {

            int len = s.Length;

            return len;

        }

 

        static void Main(string[] args)

        {

            string s1 = "Computer";

            int strLen=strLength(s1);

            Console.WriteLine(strLen);

            Console.ReadLine();

        }

    }

 

 

Array of strings

 

static  void  strArr(string[] dat)

        {           

            foreach (string value in dat)

            {

                Console.WriteLine(value);

            }

        }

 

        static void Main(string[] args)

        {

            string[] data = { "Altyn", "Bolat", "John" };

            strArr(data);

 

            Console.ReadLine();

        }

 

 

П. Questions for self-assessment.

What is the difference of procedure and function?

How the loop operator Foreach functions?

 

Visual Aids and Materials links.

1.      Slides

2.       https://www.dotnetperls.com/array

 

Students' Practical Activities:

Students must be able:

·     Write code for processing the strings using functions

·     Write code for processing the strings using procedures


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

Посмотрите также