WG6 – Sixth Form Induction Information and Tasks

SUBJECT A-LEVEL COMPUTER SCIENCE

In this subject you will be expected to develop:  an understanding of and ability to apply the fundamental principles and concepts of computer science including; abstraction, decomposition, logic, algorithms and data representation  the ability to analyse problems in computational terms through practical experience of solving such problems including writing programs to do so  the capacity for thinking creatively, innovatively, analytically, logically and critically  the capacity to see relationships between different aspects of computer science  mathematical skills  the ability to articulate the individual (moral), social (ethical), legal and cultural opportunities and risks of digital technology.

You will need to have an interest in:  the way in which computers work at a fundamental level including hardware, software, the use of data, logical structures and the transmission of data  computational thinking and problem solving  legal, moral, ethical and social issues relating to computers  programming.

Independent learning in this subject requires: (5hrs of independent study) A-Level Computer Science will develop your understanding from the GCSE Computing or Computer Science course that you studied at Key Stage 4 and will therefore require you to work independently, in addition to lessons, in order to understand theory material for the 2 40% examinations which you will complete in Year 13. In addition you will be expected to work independently to develop your understanding of programming in order to prepare for the non-examination programming coursework unit which is worth 20% of your final grade. Teachers at both schools will set homework on a weekly basis and you will be expected to use your text book and computer-based resources to further your understanding of topics in addition to weekly homework. The course has an emphasis on problem- solving.

Suggested reading: You will need to purchase the course text book below for your first lesson in September and bring it with you to all lessons. A set of reference copies will be held in classrooms at both schools (but cannot be taken out of lessons) if you are unable to purchase the textbook for any reason. In addition there are many web-based resources that you can use to help you to prepare for the course, some of which are listed below.

Text Book: Computer Science for A-Level (OCR). Authors: George Rouse, Jason Pitt, Sean O’Byrne ISBN: 978-1-471-83976-4

Programming Websites: http://www.codecademy.com/ - good for learning how to program in HTML, CSS, Python, JavaScript, Ruby, PHP and other languages. http://www.w3schools.com/ - an excellent website for learning how to program in web-based languages. http://inventwithpython.com/chapters/ - an introduction to Python programming. http://www.homeandlearn.co.uk/net/vbNet.html - an introduction to Visual Basic programming.

Examples of Independent Study tasks:  Completing pre-learning reading and activities in preparation for a Computer Science theory lesson. Pre-learning means studying something before a lesson in order to be able to participate fully in activities relating to the topic and therefore develop your understanding further.  Completing programming tasks set by the teacher to develop your programming ability in a given programming language.  Completing a research task about a particular aspect of Computer Science theory, such as ‘normalisation’ or ‘object-oriented programming’.  Completing examination-type questions related to a particular aspect of the Computer Science theory.  Completing activities (research/planning/design/analysis/testing/evaluation etc…) relating to the 20% coursework programming project.

Coursework: This qualification has one non exam assessment (coursework project) which takes the form of the Programming project. The project is a substantial piece of work which assesses a variety of different skills including the development and demonstration of computational thought processes. Students will need to choose, in liaison with their teacher, a well-defined user driven problem which involves using substantial programming code. Students will then analyse the situation, consider methods for solving the problem and design a solution. They will create this solution in a given programming language before testing and evaluating the outcome. The coursework project is worth 20% of the overall A-Level grade and is internally assessed and externally moderated.

Coursework must be completed in Year 13 as the course is linear and final deadlines will be set by your teacher.

Future Career aspirations linked to this subject are:  Higher Education courses at Universities related to Computer Science or Computing are very varied and Universities offer a wide range of courses in the general area of ‘Computing’. You may wish to study a straightforward Computer Science or Computing course at University but other courses titles include: Games Software Development, Business Information Systems, Web and Cloud Computing, Enterprise Systems, Big Data Analytics, Database Professional, Artificial Intelligence, Software Engineering and many more. A search of the UCAS database will turn up many different courses that a Computer Science A-Level may lead on to. Most of these courses will have common modules or elements giving you a grounding of higher-level Computer Science concepts.  Making a career in Computing can be very intellectually rewarding, as well as lucrative. There are many different career options from Database Administrator to Software Developer and Web Designer. Many companies offer apprenticeships and training in Computer Science based careers and some will even fund Higher Education courses while you work for them. WGSB has links with a Software Development company who are keen to recruit new staff and work experience placements may be available with them.

Induction Programming in Visual Basic.Net Tasks Task & Success There are two separate tasks on the following pages. The Activity 1 is console based; Activity Criteria 2 is Windows form based.

If you have never coded in Visual Basic before then you are to complete both Console based programs (Program 1 & 2) from Activity 1 along with the step-by-step guide before it. . If you are confident with Visual Basic.net and have used it before then you should complete Activity 2 using Forms. The programs need to be saved on a memory stick or other device and this should be brought to your first lesson. You may want to complete Activities 1 and 2 also as a re-cap. You will be assessed on your programs using the assessment grid at the end.

Resources Required: You will need to download Visual Basic Express 2012 – the link is provided below. You should use http://www.homeandlearn.co.uk/net/vbNet.html - an introduction to Visual Basic programming, to help you with the activities below if you are new to VB.Net. You should see similarities to the language you used at GCSE. The screenshots below are designed to help you to complete the work successfully. We have assumed that you have a good knowledge of Programming concepts from GCSE level.

Help: If you have any problems with downloading software or have any queries about the task/s you will need to email: [email protected]. No excuses will be accepted for not having completed the tasks below before the first lesson back in September.

Activity 1: Console Mode

Basics of programming Objective: You will be looking at programming basics in order to promote good programming technique.

To start… Install Visual Basic Express 2012 on to your Computer (http://www.microsoft.com/en- gb/download/details.aspx?id=34673)

During installation you might be asked to select the environment you want, select General Development Settings.

New Console Based Program

Name the project ‘Reverse_a_string’ and press ‘OK’.

Getting started: T a sk 1 – R e verse a s t r in g ( t ype)

Copy the following code into the Sub Main().

Output Use F5 to output

How the program works o We needed two variables inputName and revInputName o We used the Dim keyword which is used to declare a variable and assign memory space o We declared what data type we wanted to used (as String) o We could have written: Dim inputName, revInputName as String o We input the value using Console.Writeline(“”) and assigned the value to inputName using Console.Readline() o We reversed it using the built in function StrReverse() and then assigned the new value to revInputName o We then printed it to screen T a sk 2 - Di v isors

The proper divisors of a positive integer n are those integers, excluding n itself, that divide n exactly. For example, the proper divisors of 12 are 1,2,3,4 and 6.

TASK: Write a program that inputs a positive integer and outputs its proper divisors. Sample Run values:- Input: 8 Output: 1 2 4

(H i n t: You w ill n e ed to use a For lo o p a n d f i n d o u t a bout M OD to do this task – see below)

2 (a) Find out what a For-loop is and how to use it. An example has been shown below that you may want to try coding: This example uses a For-loop to display numbers for 10 to 2, counting down in steps of two.

2 (b) Find out about MOD and how it works. 2 (c) Now, write your program in the space provided below or on another piece of paper.

Module Module1 Sub Main() ‘Start coding here End Sub End Module

Your code should look something like this:

How the Program Works (what we did):  The Mod Function returns the remainder after the division for example 10 / 6 = 1 remainder 4. We want to know what numbers go into our positive integer without leaving a remainder i.e. 0  So if our positive integer was 10 we would want to either store or print the numbers that leave no remainder – they would be 5, 2 and 1.  We used a loop which started at the value of the positive integer – 1 and stepped down by 1 to zero. We assigned all the values that have no remainder and then printed them to screen

Debugging and Tracing – use Step Into (http://www.youtube.com/watch?v=Uk-a7qVa36c)

Watch the video about debugging and tracing and try the code below. YOUR INDUCTION TASKS – ACTIVITY 1 (COMPLETE THIS IF YOU’VE NEVER USE VB.NET) You must complete both Console mode programs (Program 1 & 2) prior to your first lesson in September. The programs need to be saved on a memory stick or alternative portable storage and this should be brought to your first lesson in order to be handed in.

ACITIVITY 1 INDUCTION TASK: CONSOLE MODE

Program 1 Write a program that asks the user to input a number between 1 – 20. Get your program to display that many stars on screen

Hint: You will need two variables one for the input and one for the loop

Program 2 – Even and odd numbers Write a program that asks the user to input positive whole number. Your program will then work out whether the number is either even or odd The program will return a message to screen to tell the user

Activity 2: Windows Form Mode (ONLY COMPLETE THIS IF YOU ARE CONFIDENT IN VB.NET) Using Forms in VB.NET

Introduction Task Install Visual Basic Express 2010 (http://www.microsoft.com/en-gb/download/details.aspx? id=34673) and start a new project using Windows Forms Applications.

The forms and other elements in the NET environment offer event – driven objects. All objects you place on the form use events such as Click, Load, OnMouseOver etc. to trigger code. Start a New Project and Select Forms Application

Naming conventions Each object that goes onto the form should have a name that identifies its role along with the correct syntax.

Task 1 - C h a n g in g t he p ropert i es of a n obj e ct All objects such as buttons, labels etc. have properties that can be accessed and changed. It is good practice to name all objects as above then when you come to debugging it suddenly becomes a lot easier.

1. Place a label on the form

2. Name it lblExamMark 3. Set its Text Property to Enter exam mark

4. Finish the form so it looks like this Task 2 - Wr i t i n g t he c o d e

5. Access the code via the code window

6. Set up two global variables which can be accessed anywhere in the program and then initialise them both to zero 7. Hide the Mean label and text box 8. Disable the Mean button

9. When the OK button is clicked this should happen:  The Show Mean button must be enabled so the user can click it to find the mean  The exam mark entered by the user should be removed  The cursor must be positioned ready for the next exam mark  The exam mark should be placed in the List box  Double click on the OK button to access its click event – add the following code

Task 3 – Run the application

10. Enter the Exam Marks and click OK

11. When the Mean button is clicked the text box and label should display. Task 4 – Test the application

Task 5 – Code the Quit button

Task 6 – Extension Activity Part A When you have to enter a lot of numbers say 10, clicking on the OK button each time is tedious. See if you can alter the program to do away with the OK button and use the Enter Key instead.

Hint: If you double click on the txtMark text box it will give you this. The TextChanged event is not what we want, however, if you change it to the KeyDown event you can code it so the Enter key does the work The PSUEDO algorithm is as follows IF KeyCode = the Enter key THEN DO what the OK button does END IF You can copy the code from the OK button and when it is working with the Enter key delete the OK Button.

Part B Add two more labels and one text box. Set one label and text box for the user’s name. Use the other text box to display the user’s name and the Mean mark in a sentence.

Hint: The variable for the name will need to be global. Use the mean button click event to run the code Marking Assessment Criteria (for Activity 1)

Success Criteria Completed? Use of suitable data types. Use of iteration to solve problem. Code is commented thoroughly. Use of in built functions to solve problem (MOD). Variables are named and used suitably. Use the logic operators AND, OR and NOT

Marking Assessment Criteria (for Activity 2)

Success Criteria Completed? Use of suitable data types. Use of iteration to solve problem. Code is commented thoroughly. Use of in built functions to solve problem (MOD). Variables are named and used suitably. GUI is suitably designed giving an easy to use graphical user interface. Form controls used and manipulated correctly. Use the logic operators AND, OR and NOT

Deadline First lesson in September at WGSB.