Reference no: EM133928355
Introduction to programming
Problem 1 : Sequence and Data
Our first programs will involve using a sequence of instructions that manipulate data within the computer. We will focus on how the computer executes these instructions, as well as getting some more practice using the command line to build and run our programs.
Show us that you can:
• Create small programs with:
o A sequence of instructions that achieve something o Variables to store changing values
o Assignment statements
o Method calls, with a range of arguments
• Correctly use programming terminology to explain your code. • Do this without using anything we haven't covered yet
Give us:
• A PDF with your learning journey, summary, and reflections using the template from the task resources.
• Code for one Test Your Knowledge activity.
We will check that you have:
• Provided evidence you have engaged with the learning material • Shown us your process for learning in the learning journey
• Demonstrated you can create programs using only the things covered
• Understood how your code works, through comments, screenshots, and discussions.
• A reasonable mental model of variables, methods, and sequence • Been able to follow the coding convention we are using
Do the following:
1. Copy and open the submisiontemplate .
2. Read Chapter 0 Introducing Instructions from Part 1 of the Programmer's Field Guide.
3. Review Chapter 1 Sequence and Data, make sure to capture your progress on the guided tours and the concepts you explore in depth in your learning journey.
Read actively!
Actively read these chapters. Build and run the sample programs, change it to test your understanding. Capture screenshots to demonstrate your learning progress. Write a little in your learning journey to capture your understanding as it develops.
4. Complete one of the Test Your Knowledge activities from the Sequence and Data chapter of the Programmer's Field Guide.
5. Complete your submission - write the summary and reflections in the template. Download this as a PDF when complete.
6. Upload to OnTrack and engage with feedback to get this complete!
Problem 4: Control Flow
Learn to use control flow statements to take your programs to the next level - making them interactive and responsive. This will build upon your understanding of sequence and how the computer executes instructions, showing how you can manipulate this sequence using control flow statements.
Show us that you can:
Create small programs with:
Boolean expressions that include comparisons and logical operators to form expressions that test given conditions
Branches using if can switch/case statements
Loops using while, do while, and for statements
Correctly use programming terminology to explain your code.
Do this without using anything we haven't covered yet
Give us:
A PDF with your learning journey, summary, and reflections using the template from the task resources.
Code for one Test Your Knowledge activity
We will check that you have:
Used control flow statements correctly to achieve your desired results
Provided evidence you have engaged with the learning material
Shown us your process for learning in the learning journey
Demonstrated you can create programs using only the things covered
Understood how your code works, through comments and screenshots
Do the following:
Copy and open the submission template.
Review Chapter 2 Communicating Syntax and Chapter 3 Control Flow, make sure to capture your progress on the guided tours in chapter 3 and the concepts you explore in depth in your learning journey. Get expert online assignment help in the USA.
Demonstrate how the following two small programming snippets run using the Hand Execution process described in the Programmer's Field Guide. Do this on paper with a pencil. Capture a photo of your workings.
using static System.Console;
using static System.Convert; int target;
Write("Count to: ");
target = ToInt32(ReadLine()); // User enters 3 int i = 0;
while (i < target)
{
WriteLine(i); i++;
}
using static System.Console;
using static System.Convert; int i;
for (i = 0; i < 11 ; i++)
{
if ( i > 0 && i % 3 == 0 )
{
i++;
continue;
}
WriteLine(i);
}
Complete at least one of the Test Your Knowledge activities from the Control Flow chapter of the Programmer's Field Guide.
Complete your submission - complete the summary and related activities in the template. Then download as a PDF.
Upload to OnTrack and engage with feedback to get this complete!
Problem 5: Starting C / C++
The next part of our journey will explore how to organise our code and data. To do this, we need to first switch programming languages. We will be using C/C++ for this next part and this task focuses on the similarities and differences you will find with this new language.
Show us that you can:
Compile and run C/C++ programs, including linking with external libraries.
Code programs using C/C++ that include:
Variable declarations, assignment statements, and function calls.
Boolean expressions that use comparisons and logical operators.
Branches using if and switch case.
Repetition using while, do while, and for loops.
Do this without using anything we haven't covered yet
Give us:
A PDF with your learning journey, summary, and reflections using the template from the task resources.
Code for one of the programs you converted to C++
We will check that:
You have things working in C/C++
You have considered similarities and differences between these languages - in terms of what we have covered.
Do the following:
Copy and open the submission template.
Read Chapter 0 Introduction from Part 2 of the Programmers Field Guide.
Review Chapter 1 Starting C/C++, make sure to capture your progress on the guided tours and the concepts you explore in depth in your learning journey.
Ensure you have familiarised yourself with the C++ build and run process - review your steps from the P2 task if needed.
Convert the C# program you created for the P4 Test Your Knowledge task into C++ code. Make sure this compiles and runs.
Complete your submission - complete the summary and related activities in the template. Download as PDF.
Upload to OnTrack and engage with feedback to get this complete!
Problem 6: Structuring Code
As the logic in your program grows, you will need better ways to organise your code. Learn how to structure your code to better organise the logic and your thoughts using functions and procedures.
Show us that you can:
Create functions and procedures
Use parameters and local variables to manage data
Return data from functions
Correctly call functions and procedures you have created
Do this without using anything we haven't covered yet
Give us:
A PDF with your learning journey, summary, and reflections using the template from the task resources.
Code for one Test Your Knowledge activity
We will check that you have:
Continued to show engagement in your learning journey using the things we have covered.
Correctly used functions, procedures, and parameters and have not used
any global variables in your Test Your Knowledge solution.
Do the following:
Copy and open the submission template.
Review the Structuring Code Chapter from Part 2 of the Programmers Field Guide, make sure to capture your progress on the guided tours and the concepts you explore in depth in your learning journey.
Complete one of the Test Your Knowledge activities.
Complete your submission - complete the summary and related activities in the template. Download as PDF.
Upload to OnTrack and engage with feedback to get this complete!
Problem 7: Structuring Data
Now that you have functions and procedures to help you organise your code, you can start to build larger programs. One problem at the moment is how to organise the data in your program. Simple variables are getting clunky, so we need to look at ways we can start to organise our data more meaningfully in our code.
Show us that you can:
Create structs to organise your data into meaningful entities.
Create enumerations to capture discrete values where appropriate.
Use your custom types with local variables, fields, parameters, and function return types.
Do this without using anything we haven't covered yet
Give us:
A PDF with your learning journey, summary, and reflections using the template from the task resources.
Code for one Test Your Knowledge activity
We will check that you have:
Continued to show engagement in your learning journey.
Correctly used structs and enums to help you manage your data.
Do the following:
Copy and open the submission template.
Review the Structuring Data chapter of Part 2 of the Programmer's Field Guide, making sure to engage with the guided tour and concepts.
Complete one of the Test Your Knowledge activities.
Complete your submission - complete the summary and related activities in the template. Download as a PDF.
Upload to OnTrack and engage with feedback to get this complete!
Problem 8: Working with Multiples
So far, our programs have been working with variables that store a single value/entity. We need new tools to help us work effectively when we want to work with many values. In this task you will see how we can use the power of the computer to work with multiples by making use of arrays.
Show us that you can:
Use pass by reference to pass to allow functions and procedures to update passed in data.
Declare and use arrays within your code in variables, fields, and parameters.
Write code that interacts with the array, and with its elements.
Iterate over the elements in an array to interact with each as an individual value.
Use hand execution to illustrate how code works with an array.
Do this without using anything we haven't covered yet.
Give us:
A PDF with your learning journey, summary, and reflections using the template from the task resources.
Code for one Test Your Knowledge activity
We will check that you have:
Continued to show engagement in your learning journey.
Correctly used arrays, loops and references to work with multiples.
Been able to use arrays and structs to keep related data together.
Created code to explore using arrays with primitive data.
Created code to explore using arrays as fields within a struct.
Created code to explore having an array of a struct type.
Used the hand execution process from the Field Guide.
Do the following:
Copy and open the submission template.
Review the overview and guided tour from Chapter 4 Indirect Access from Part 2 of the Programmer's Field Guide to understand how references work - you need a basic understanding of this to know how to work with arrays in C/C++. Note: completion of the guided tour is optional.
Review Chapter 5 Working with Multiples from Part 2 of the Programmer's Field Guide, engaging with the guided tour and concepts. Note that for higher grade tasks you will need to be able to combine the use of arrays and structs, and link these with the functions and procedures you create.
Complete one of the Test Your Knowledge activities.
Complete your submission - complete the summary and related activities in the template.
Upload to OnTrack and engage with feedback to get this complete!
Problem 9: Another Language
So far, we have focused on learning to program in a way that should transfer to other languages. As you progress in your studies and IT career, it will be important that you can learn new languages yourself. You should now have a solid understanding of the basics that underlie programming languages, use the knowledge and skills you have developed in this unit to learn and build some small Python programs.
Show us that you can:
Find and use general programming language documentation, and other online resources, to learn Python.
Create basic programs using the Python language - using built in types, control flow, and functions.
Reflect upon the differences and similarities between languages, and the transferable nature of foundational programming knowledge and skills.
Give us:
A PDF with your learning journey, summary, and reflections using the template from the task resources.
Python code for a program that demonstrates scripting with the python language.
We will check that you have:
Got Python working, and have built a number of small Python programs.
Demonstrated you can use a range of Python control flow statements.
Declared and used functions to organise your code.
Reflected upon how to transfer programming concepts from one language to another.
Do the following:
Copy and open the submission template.
Ensure you have a working version of Python installed on your computer.
Identify and use resources to help you get started with Python. We recommend:
The Python Tutorial - this is the official Python documentation. I suggest skimming (or skipping) Page 1 and Page 2. Page 3 provides a good introduction to expressions, statements, and the main types - work through this. Similarly, Page 4 covers control flow and functions, so use this to get started with the various control flow statements and to build your own functions. Page 6 shows how to import modules - like using in C# or #include in C/C++. Note the section on Page 6 about Executing modules as scripts - this shows how to create an equivalent of main by checking if this module is called " main ".
If you need other support, consider some of the online tutorials and books such as Foundations of Python Programming from Runestone academy, or Introduction to Python from Geeks for Geeks. These cover the concepts alongside the syntax, so you can align these concepts with what you already know.
Create a C/C++ and Python version of one of the following programs, or a similar program of your own invention. Each program needs to involve the creation of functions, use of control flow, arrays/lists, and user input/output. Put your C/C++ and Python versions side by side and note the similarities and differences in your Learning Journey.
Temperature Tracker
Asks the user to input a number of daily temperatures (array/list of doubles, up to 20) then output the following details:
Calculate and display the average temperature.
Display the highest and lowest temperatures.
Count how many days were above the average.
Grocery List Manager
Allow the user to build a grocery list (array/list of strings, up to 20). The user should be able to:
Add items to the list
Remove items from the list
View the list
Student Grade Analyser
Allow the user to enter a list of grade results (array/list of integers, up to 20). Output the average grade, pass rate (% that are >= 50/100) and number of high distinction achievements (number >= 80/100).
Complete your submission - complete the summary and related activities in the template.
Upload to OnTrack and engage with feedback to get this complete!
Problem 10: Classes and Objects
Now that you have learnt the foundational concepts of programming, the next big concepts involve classes and objects and learning new languages. We have started with Python, so now let's have a look at classes and objects. These build upon structs and functions, so you are already familiar with the basics - it is just about a new way of bringing these together.
Show us that you can:
Explain the introduced object-oriented programming concepts, and mechanisms.
Describe objects in terms of what they know and can do.
Create Python classes that include fields and methods.
Use Python classes to create objects.
Use Python objects to perform actions by calling methods.
Describe value and reference types in general, and in relation to Python.
Give us:
A PDF with your learning journey, summary, and reflections using the template from the task resources.
Python code your test your knowledge activity.
We will check that you have:
Been able to create and use Python classes and objects
An appropriate explanation of Python objects and where they live.
Do the following:
Copy and open the submission template.
To understand the basis of object oriented programming this you will need to review a few concepts:
References - from Indirect Access.
C++ Memory Allocation - from Memory Deep Dive.
Review the overview of the Member Function chapter, with a focus on Struct Member Functions and Classes.
Now review the way this works in Python.
Step through the Classes Chapter in the Foundations of Python
Programming from Runestone academy. This will walk you through the concepts and coding in Python in a constructive manner.
Alternatively, Page 9 of the Python Tutorial introduces Classes, but assumes you are already familiar with the concepts. The section A First Look at Classes gives an overview of the features we need, the other sections we will review in subsequent tasks.
Complete the Account Class and Objects guided tour to see how to build classes using these concepts. We recommend building both a C++ and Python version of this. However, make sure to build the Python version if you do choose to build just one.
Build a Python version of one of the Test Your Knowledge activities. Get expert online assignment help in the USA.
Complete your submission - complete the summary and related activities in the template.
Upload to OnTrack and engage with feedback to get this complete!
Problem 11: Inheritance and Polymorphism
Inheritance and polymorphism give you some new programming mechanics. Inheritance allows you to create related "families" of classes - where child classes inherit features from parent classes. We have already been using several forms of polymorphism, which just relates to things being able to be used in multiple
contexts (eg: you can use + with int, double, and string). However, with objects and inheritance we get a new type where we can use child objects anywhere a parent object is expected (as they have all of the same features, and potentially more).
This results in some new ways of working that you will explore in this task.
Show us that you can:
Explain the mechanics of inheritance and subtype polymorphism.
Explain how child classes can override and extend inherited features.
Build Python classes that inherit from a parent class.
Extend and override inherited features in child classes.
Make use of inheritance and polymorphism to create and use objects.
Create and use abstract classes and methods.
Give us:
A PDF with your learning journey, summary, and reflections using the template from the task resources.
Python code your test your knowledge activity.
We will check that you have:
Developed an appropriate understanding of inheritance and polymorphism.
Demonstrated how to implement inheritance, and you can explain how this works.
Demonstrated how to use subtype polymorphism with overridden features from a number of child classes.
Demonstrate the use of abstract base classes.
Do the following:
Copy and open the submission template.
Return to the overview of the Member Function chapter, and focus on the
remaining concepts: inheritance, polymorphism, member scope, and abstract methods and classes.
Now review the way this works in Python.
Step through the Inheritance Chapter in the Foundations of Python
Programming from Runestone academy. This will describe the concepts, and step you through how to use these with their game example.
Alternatively, Page 9 of the Python Tutorial includes inheritance in their coverage of classes (even with a handy C++ reference). This does not introduce the concept of inheritance, but shows how to use it in Python.
Also review Abstract Base Classes in Python - it is harder to find a good official article on this, but this gives a reasonable overview of how to build abstract classes in Python.
Complete the Transactions guided tour to see how to use inheritance, polymorphism, and abstract classes. Again, we recommend building both a C++ and Python version of this. However, make sure to build the Python version if you do choose to build just one.
Build a Python version of one of the Test Your Knowledge ++ activities.
Complete your submission - complete the summary and related activities in the template.
Upload to OnTrack and engage with feedback to get this complete!
Problem 12: Learning Summary
To conclude this unit, you need to submit a portfolio. The start of your portfolio includes a learning summary report in which you reflect on what you have learnt and indicate the grade you are applying for. Think of this like a cover letter to a job application, but in this context you are relating what you have learnt to the unit's
learning outcomes, and the grade standards that were presented in the P1 Learning Plan task.
Show us that you can:
Reflect on your learning journey in a personal manner, summarising your achievements using the "What? So What? Now What?" critical reflection model.
Clearly and concisely articulate your achievements, and how they relate to the unit learning outcomes and your personal learning goals.
Present a compelling argument that the work you have completed in
OnTrack demonstrates you should get the grade you are aiming to achieve.
Give us:
A PDF document containing reflections on your learning and experience within the unit.
We will check that you have:
You have outlined your achievements in the Portfolio overview
You have highlighted which grade you believe you have met, and how you demonstrate the associated grade persona.
Summarise how you have met the learning goals (the unit learning outcomes) and how your focus helped you achieve these.
Use the guided questions to Reflect on your achievements.
Do the following:
Copy and open the submission template.
Reflect on your achievement in the unit. You could go back and look at what you indicated in the P1 Learning Plan task. Consider what you thought about software development at that time, and how you have evolved. How did you use the opportunities available through the unit to advance your
understanding? Were there any big challenges you overcame?
Review the questions and sections of the template and then use these to capture your journey and present your best case for the grade you are aiming to achieve.
Upload to the task for feedback. As this task is generally at the end of the semester, you may not have time to get feedback from the teaching team. Make sure to go ahead and create your portfolio. You can go back and rebuild it if you do get a chance to make changes.
Create your portfolio using the Portfolio creation tool in OnTrack. Follow the
steps to create your portfolio, and you should get an email when it is available for you to review. Return to the portfolio creation tool and you can download a copy and make sure everything looks ok.