Skip to document

Programming 3A

Kindly assist with examination papers and memorandum for programming 3A PRG310
Course

Programming

119 Documents
Students shared 119 documents in this course
University

Damelin

Academic year: 2021/2022

Comments

Please sign in or register to post comments.

Preview text

DIPLOMA INFORMATION TECHNOLOGY

PROGRAMMING 3 A

STUDY GUIDE 2020

COPYRIGHT © DAMELIN, 2020

All rights reserved. No part of this publication may be reproduced, distributed, or transmitted in any form or by any means, including photocopying, recording, or other electronic or mechanical methods, without the prior written permission of Educor Holdings. Individuals 9 found guilty of copywriting will be prosecuted and will be held liable for damages.

TABLE OF CONTENTS

    1. About Brand
    1. Our Teaching and Learning Methodology - Icons
    1. Introduction to the Module
    • 3 Module Information
    • 3 Module Purpose
    • 3 Outcomes
    • 3 Assessment
    • 3 Planning Your Studies
    1. Prescribed Reading
    • 4 Prescribed Book
    • 4 Recommended Articles
    • 4 Recommended Multimedia
    1. Module Content
    • 5 A FIRST PROGRAM USING C#
      • 5 1 1 Introduction
      • 5 1 2 T he Pr og r ammi ng Pr oc ess
      • 5 1 3 Pr oc edur al a nd O bj ec t 0 r i ented Pr og r ammi ng
      • 5 1 4 Featur es of O bj ec t 0 r i ented Pr og r ammi n g Lang uag es
      • 5 .1 .5 Getting Sta rted w it h C#
      • 5 1 6 How to Run y our C # Pr og r am
      • 5 1 7 S ummar y
    • 5 USING DATA
      • 5 2 1 Introduction
      • 5 2 2 Variables
      • 5 2 3 Predefined Value Types
      • 5 2 4 Summary
    • 5 USING GUI OBJECTS AND THE VISUAL STUDIO IDE
      • 5 3 1 Introduction
      • 5 3 2 A First C# Windows Form
      • 5 3 3 Adding Controls to a Blank C# Form
      • 5 3 4 Properties of a Control
    • 5 3 5 Adding C# Code to a Button
    • 5 3 6 Variables
    • 5 3 7 Summary
  • 5 MAKING DECISIONS
    • 5 4 1 Introduction
    • 5 4 2 Understanding Logic-Planning Tools and Decision Making
    • 5.4.2 Logic-Planning Tools..........................................................................................................
    • 5 4 3 Making Decisions Using If Statement
    • 5 4 4 Nested If
    • 5 4 5 Maki ng Dec i si ons Usi ng the i f -el se S ta te ment
    • 5 4 6 Usi ng C ompoun d Expr essi ons i n i f st ate ments
    • 5.4.6 Using the Conditional AND Operator
    • 5 4 7 Making Decisions Using the Switch Statement
    • 5 4 8 Summary
  • 5 LOOPING
    • 5 5 1 Introduction
    • 5 5 2 Loops
    • 5 5 3 Creating Loops with the while statement
    • 5.5.3 Creating Loops with the Do Statement
    • 5 5 4 Creating For Loops
    • 5 5 5 Summary
  • 5 USING ARRAYS
    • 5 6 1 I ntr oduc ti on
    • 5 6 2 Maki ng Dec i si ons Usi ng I f S tatement
    • 5 6 3 Usi ng the S or t() Meth od
    • 5 6 4 Usi ng the Rev er se() Meth od
    • 5 6 5 Usi ng Mul ti di mensi on al Ar r ay s
    • 5 6 6 Usi ng Jag g ed Ar r ay s
    • 5 6 7 S ummar y
  • 5 USING METHODS
    • 5 7 1 I ntr oduc ti o n
    • 5 7 2 Under standi ng M etho ds
    • 5 7 3 Passi ng Ar r ay Val ues to a Met ho d
    • 5 7 4 S ummar y

1. About Brand

Damelin knows that you have dreams and ambitions. You9re thinking about the future, and how the next chapter of your life is going to play out. Living the career, you have always dreamed of takes some planning and a little bit of hard work, but the good news is that Damelin will be there with you every step of the way.

We have been helping young people to turn their dreams into reality for over 70 years, so rest assured, you have our support.

As South Africa9s premier education institution, we9re dedicated to giving you the education experience you need and have proven our commitment in this regard with a legacy of academic excellence that9s produced over 500 000 world – class graduates! Damelin alumni are redefining industry in fields ranging from Media to Accounting and Business, from Community Service to Sound Engineering. We invite you to join this storied legacy and write your own chapter in Damelin9s history of excellence in achievement.

A Higher Education and Training (HET) qualification provides you with the necessary step in the right direction towards excellence in education and professional development.

2. Our Teaching and Learning Methodology

Damelin strives to promote a learning-centred and knowledge-based teaching and learning environment. Teaching and learning activities primarily take place within academic programmes and guide students to attain specific outcomes.

  • A learning-centred approach is one in which not only lecturers and students, but all sections and activities of the institution work together in establishing a learning community that promotes a deepening of insight and a broadening of perspective with regard to learning and the application thereof.
  • An outcomes-oriented approach implies that the following categories of outcomes are embodied in the academic programmes:
  • Culminating outcomes that are generic with specific reference to the critical cross-field outcomes including problem identification and problem solving, co-operation, self- organization and self-management, research skills, communication skills, entrepreneurship and the application of science and technology.
  • Empowering outcomes that are specific, i. the context specific competencies students must master within specific learning areas and at specific levels before they exit or move to a next level.
  • Discrete outcomes of community service learning to cultivate discipline-appropriate competencies.

Damelin actively strives to promote a research culture within which a critical-analytical approach and competencies can be developed in students at undergraduate level. Damelin accepts that students learning is influenced by a number of factors, including their previous educational experience, their cultural background, their perceptions of particular learning tasks and assessments, as well as discipline contexts.

Students learn better when they are actively engaged in their learning rather than when they are passive recipients of transmitted information and/or knowledge. A learning-oriented culture that acknowledges individual student learning styles and diversity and focuses on active learning and student engagement, with the objective of achieving deep learning outcomes and preparing students for lifelong learning, is seen as the ideal. These principles are supported through the use of an engaged learning approach that involves interactive, reflective, cooperative, experiential, creative or constructive learning, as well as conceptual learning via online-based tools.

Effective teaching-learning approaches are supported by:

  • Well-designed and active learning tasks or opportunities to encourage a deep rather than a surface approach to learning.
  • Content integration that entails the construction, contextualization and application of knowledge, principles and theories rather than the memorization and reproduction of information.

Additional information Find the recommended information listed.

Case study/Caselet Apply what you have learnt to the case study presented.

Example Examples of how to perform a calculation or activity with the solution / appropriate response.

Practice Practice the skills you have learned.

Reading Read the section(s) of the prescribed text listed.

Revision questions Complete the compulsory revision questions at the end of each unit.

Self-check activity Check your progress by completing the self-check activity.

Study group / Online forum discussion Discuss the topic in your study group or online forum.

Think point Reflect, analyse and discuss, journal or blog about the idea(s).

Video / audio Access and watch/listen to the video/audio clip listed.

Vocabulary Learn and apply these terms.

3. Introduction to the Module

Welcome to Programming 3A, your final programming module in your Diploma Information Technology qualification.

3. 1 Module Information

Qualification title Diploma Information Technology Module Title Programming 3A NQF Level 7 Credits 10 Notional hours 100

3. 2 Module Purpose

The purpose of this module is to provide a basic understanding of C# Programming. Further to this, skills obtained in this module will prepare learners for undertaking object-oriented programming in the work environment.

Although students are encouraged to use this guide, it must be used in conjunction with other prescribed and recommended textbooks.

3. 5 Planning Your Studies

You will have registered for one or more modules in the qualification and it is important that you plan your time. To do this look at the modules and credits and units in each module.

Create a timetable / diagram that will allow you to get through the course content, complete the activities, and prepare for your tests, assignments and exams.

What equipment will I need? • Access to a personal computer, and Visual Studio 2012.

This module will take you approximately 100 hours to complete. The following table will give you an indication of how long each module will take you.

Unit Number Hours 1 15 2 15 3 14 4 14 5 14 6 14 7 14

  1. PRESCRIBED READING

Prescribed Book

Microsoft Visual C#: 2017 An Introduction to Object-Oriented Programming - 7th Edition, Farell, J. 2018 Cengage 9781337102100

Recommended Articles

  • Cengage Learning, 2016 in C#:2-82.
  • Nakov, 2013. Fundamentals of Computer Programming with C#: 1-300.

Recommended Multimedia

Websites:

  • guru99/c-sharp-tutorial.html
  • tutorialspoint/csharp/index.htm
  • tutorialsteacher/csharp/csharp-tutorials

Video / Audio

  • youtube/watch?v=GhQdlIFylQ
  • youtube/watch?v=lisiwUZJXqQ

5. Module Content

You are now ready to start your module! The following diagram indicates the topics that will be covered. These topics will guide you in achieving the outcomes and the purpose of this module.

Please make sure you complete the assessments as they are specifically designed to build you in your learning.

STUDY UNIT 7: USING METHODS

STUDY UNIT 6: USING ARRAYS

STUDY UNIT 5: LOOPING

STUDY UNIT 4: MAKING DECISIONS

STUDY UNIT 3: USING GUI OBJECTS AND THE VISUAL STUDIO IDE

STUDY UNIT 2: USING DATA

STUDY UNIT 1: A FIRST PROGRAM USING C#

A compiler

Refers to a computer program that translates high-level language statements into machine code.

Is the process of removing all syntax and logical errors from the programs.

4. 1. 1 Introduction

Study Unit 1 introduces programming using the C-Sharp programming language, it also introduces basic object-oriented programming concepts. The unit will elaborate on programming aspects such as reserved words, identifiers, comments, and using namespaces and other key concepts.

4.1 The Programming Process

5.1.2 Defining a Computer Program

A computer program is a set of instructions, also known as software, and it tells a computer what to do (Farell, 2018). Software comes in two broad categories namely:

  1. System software – a set of instructions or programs that operate the computer.

  2. Application software – programs that allows users to complete specific or certain tasks.

Programmers write the instructions using high-level programming languages such as C# or Visual Basic. These instructions are converted, or compiled, through a series of steps into machine language (a series of 1s and 0s), the language the computer understands (Bishop & Horspool, 2006).

5.1.2 What is a compiler?

A compiler is a program that translates high-level language statements into machine code (Cifuentes, et al., 1998). The differences between compilers, interpreters, and assemblers are:

  1. Compiler – a computer program that translates high-level language statements into machine code.

5.1.2 What is High-level programming language? It is a language that uses reasonable keywords such as <read,= <write,= or <add= instead of the sequence of on/off switches that perform these tasks. Examples of programming languages are FORTRAN, COBOL, Pascal, C, C++, C# (C-Sharp), Java, VB, VB etc.

Programmers or software developers use a programming language to write or create computer programs such as:

  1. Applications

  2. Utilities

  3. Systems Programs

  4. Interpreter – a computer program that reads the source code created in a high-level language such as Dartmouth Basic and executes that program line by line.

  5. Assembler – a computer program that translates instructions written in an assembler language into machine code (Farell, 2018).

5.1.2 Programming Logic

Programming logic involves executing the various statements and procedures in the correct order to produce the desired results. Different programmers can write the same program in differing ways and all get the correct result (Farell, 2016).

5.1.2 Debugging

Debugging is the process of removing all syntax errors and logical errors from a program. Syntax errors are discovered through compilation and Logical errors are discovered through testing (Farell, 2018).

5.1 Procedural and Object 0rie nted Programming

In procedural programming, programmers create and name computer memory locations that can hold values (variables) and write a series of steps or operations to manipulate those values. The program and its procedures are separate from the stored data on which they operate.

Procedures or methods are logical units that group individual operations used in a computer program. Procedures and methods are called or invoked by other procedures or methods (Farell, 2016).

Object-oriented programming (OOP) is an extension of procedural programming and it effectively combines data and the methods that maintain it. It is on Classes and Objects. An object is defined as an instance of a class. A class is referred to as a blue print or plan from which an object is created from. An object is created from an existing class and it has behaviours, states, and attributes.

Another term for behaviours is methods, while another term for attributes is properties and these terms may be used interchangeably (Budd, 2002).

5.1 Features of Object 0riented Programming Languages

A language is object-oriented if it supports the following (Farell, 2016):

  1. Objects – an instance of a class. Software objects are like concrete objects in the real world. They contain their own attributes and behaviours. The attributes of an object represent its characteristics. The state of an object is the collective value of all its attributes. The behaviours of an object, or methods, are the things it <does= (Farell, 2018).

  2. Classes – A category of objects or a type of object. Describes the attributes and behaviours of every object that is an instance, or object, of that class.

  3. Encapsulation – A technique of packaging an object9s attributes and behaviours into a cohesive unit; an undivided entity. Using a black box to control what behaviours are exposed to calling methods.

  4. Interfaces – The interaction between a method and an object9s exposed behaviours. Uses message- passing to request and receive information.

The following are the steps to create a Console Application:

  1. Open the Visual C# Express software from the programs menu or desktop shortcut icon for Visual C#. If it9s the first time you open C# using Visual Studio Express 2012, you should see the screen below.

  2. Click File from the menu bar at the top. From the File menu, select New Project (refer to picture below):

  3. Click New Project, and the following dialogue box will appear:

  4. Click on Templates from the list on the left and select Visual C#. You will then see Console Application appear in the middle.

  5. Select Console Application. Then click OK. After clicking OK, a new Console Application project will be created for you. Some code should be displayed:

Was this document helpful?

Programming 3A

Course: Programming

119 Documents
Students shared 119 documents in this course

University: Damelin

Was this document helpful?
Programming 3A Damelin ©
1
DIPLOMA INFORMATION TECHNOLOGY
PROGRAMMING 3A
STUDY GUIDE
2020