Get Instant Help From 5000+ Experts For
question

Writing: Get your essay and assignment written from scratch by PhD expert

Rewriting: Paraphrase or rewrite your friend's essay with similar meaning at reduced cost

Editing:Proofread your work by experts and improve grade at Lowest cost

And Improve Your Grades
myassignmenthelp.com
loader
Phone no. Missing!

Enter phone no. to receive critical updates and urgent messages !

Attach file

Error goes here

Files Missing!

Please upload all relevant files for quick & complete assistance.

Guaranteed Higher Grade!
Free Quote
wave
Learning C++ Programming: Exercises and Resources

Getting Started with C++

1.While working (better still, even before working) on the exercises, you may find the viewing the videos from Bucky’s C++ Programming Tutorials useful. You should consider starting from the beginning of the video tutorial series at https://www.youtube.com/watch?

You must practice writing the code shown in the videos using the codeblocks IDE.
The video starts with installation of codeblocks – an IDE. Use the latest version of the IDE with mingwwhen working with the videos. Use the videos together with the unit textbook. The videos and the textbook are not a replacement for the lecture material as both the videos and textbook deal mainly with C++ syntax and do not cover issues with Object Orientation.

Go through the four chapters indicated earlier. You would have encountered these concepts from these chapters before using a different programming language. You need to go through these chapters to find out how these concepts are handled in C++.  You need to learn how to program in C++.

In chapter 1, you will learn how a basic C++ program is structured. Each line of code is explained. Subsequent chapters build on the previous chapters. If you have never written a C++ program before, you must go through the examples shown in the textbook. Chapter 3 on Input/Output would be something new to you if you have not worked with C++ before. The lecture notes would be using different examples so that you get a variety of examples.

Complete the following exercises before you come to the laboratory class.  Use the time in the laboratory class to obtain any help you need. You should attempt the exercises first before looking for the answers.

When completing the questions from My Unit Readings, do not read the question and then look at the answer without first trying out the question yourself. If you do, you will pay for this later when you get stuck and can’t figure it out yourself and no answers are available for you to copy.

Do the following questions and check your answers. Questions and Answers are at library’s My Unit Readings for this unit. See advice above.

  1. Exercise 26 on page 106
    Basic Elements of C++
  2. Exercise 15 on page 111
    Basic Elements of C++
  3. Exercise 25 on page 113
    Basic Elements of C++
  4. Exercise 11 on page 163
    Input/Output
  5. Exercise 6 on page 165
    Input/Output
  6. Exercise 10 on page 224
    Control Structures 1 – Selection(it will defeat the purpose if type the program and let the compiler find the error. So analyse the code manually.)
  7. Exercise 11 on page 225
    Control Structures 1 – Selection(it will defeat the purpose if type the program and let the compiler find the error. So analyse the code manually.)
  8. Exercise 16 on page 229
    Control Structures 1 – Selection
  9. Exercise 25 on page 297
    Control Structures 11 – Repetition
  10. Exercise 30 on page 299
    Control Structures 11 – Repetition (it will defeat the purpose if you type the program and run. So analyse the code manually.)

2. Go through the chapter on Classes and Data Abstraction of the textbook that you have “C++ Programming: Program Design Including Data Structures” by Malik and attempt the following questions from the My Unit Readings at the library site, and compare your answers with those given in the document. You need to start work on these exercises beforeyou come to the laboratory class.  Use the time in the laboratory class to obtain any help you need.

Exercises: Chapters 1-4

Exercise 1 on page 650

Exercise 3 on pages 650 – 651

Exercise 5 on page 652

Exercise 7 on page 653

Exercise 9 on page 654

Once you have completed the above, attempt the other (even numbered) exercises on pages 650 - 653.

 

3. Before starting this exercise and any subsequent exercises, you should have completed the above exercises and the PowerPoint slides for this topic.If you proceed without completing all of the above, you can get lost and confused.

In the folder “slide examples”, Lec-03-CD-V02.zip contains the source files from the slides for topic 1. Some code changes were made for this exercise. Examine the code using codeblocks, compile and run the code. Fix any errors – see below.

Which constructor is used for creating the track2 object?

Is the output of track2 correct? How would you fix it? Fix the problem and run the program again.

Think of why the output of track2 has gone wrong and how would you prevent the client programmer from making use of your Track class incorrectly.

4. If doxygen, graphviz and staruml are not installed, please install them on your machine.

For Doxygen:

You run Doxygen on the code from Lec-03-CD-V02.zip.

On the Source Browser tab, tick everything except Use_Htags. Make sure that the HTML output has graphical relations displayed. Do not select Latex, RTF or Man output in their respective tabs. 

You will find that the doxygen tool not only helps with documenting the code but also helps you to find errors in your design or implementation. 

After you have learned how to use the doxygen tool, learn how to comment your source code using doxygen style comments. Explanation with examples is provided doxygen manual. A version of this manual is available doxygen at the unit site. You can read all of it or start at the chapter on "Documenting the code". 

Once Doxygen has finished running on your code, look at the html directory created by doxygen. Load any html file from there and explore. An example is found in Practice. Look at DoxyExample. Don’t worry if you don’t fully understand the C++ code yet. You will need to complete the various topics in ict283 first. For this topic, it is only about writing doxygen comments.

5. Starumldemo2C++.zip contains an example used in the lecture do demonstrate how to use the tool StarUML. The tool can generate C++ code from the design and you might want to try it out. You are advised not to rely on it for being totally correct. If you make changes to the source code and you recreate the source again from the UML diagram, the changes you made will be lost as the files get over written. 

StarUML.pdf is a quick introduction on how to use StarUML. You need to explore StarUML to find out how it works. We are concerned with the Design Model and StarUML can do a lot more but is not needed for our purposes. In the Model Explorer window you will see Design Model. Open this up and as you build your classes, examine what happens there. 

6. Experiment with StarUML. Learn how to draw classes.  You may use the staruml found in the software folder.

support
Whatsapp
callback
sales
sales chat
Whatsapp
callback
sales chat
close