Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask C/C++ Expert


Home >> C/C++

Introduction to Computing Assignments

Assignment 1 - Pololu Robot Line Sensors

1. Administration

Requirements  - Design and implement a C++ program for the following specification. The program is to be written using the online mbed compiler for the Pololu robot.

2. Program Overview -

Requirements

  • Write a program to operate the Pololu robot so it follows a black line on the floor.
  • Use the design in the given structure diagrams.
  • The robot should stop if it goes off the line.
  • If the line is a loop, the robot should run until you stop it by turning off its power. Suitable lines will be provided (straight line, circle and ellipse).

Program Design

A program design is provided in the given structure diagrams. Write your program from these diagrams. The diagrams only show operational program statements. You also need to write include statements, function prototypes, variable and constant definitions, etc, even though these are not shown on the diagrams.

Assessment

The assessment of your program for this assignment will be based mainly on (but may not be limited to) the following points:

  • Source code compiles and links ("builds") without any errors or (significant) warnings.
  • The program runs according to the requirements.
  • Uses the design on the given structure diagrams.
  • Source code is correctly formatted (good layout).
  • Source code is appropriately commented.
  • Uses function prototypes.
  • Uses appropriate named constants and variable names.
  • Uses local variables whenever appropriate.
  • Displays appropriate information on the PC (time, line position, sensor values).
  • The display on the PC is well formatted.

The program will be tested on a straight line, a circle and an ellipse, as available in the lab.

Assignment 2 - Voltage Divider Design

1. Administration

Requirements - Write a C++ program for the following specification and structure diagarms, using Visual Studio.

2. Program Specification

Overview

You are required to design a program to calculate the best possible standard resistors to use for a voltage divider circuit to get the required circuit gain. The circuit will contain 2 to 4 resistors as in the following circuit diagram.

429_figure.png

Requirements

  • Write a program to calculate the optimum resistor values for a voltage divider circuit.
  • Use the design in the given structure diagrams.

In this assignment, you need to demonstrate that you can:

  • write your own functions and call them correctly,
  • use arrays, including passing an array as a function parameter,
  • use reference parameters.

Some aspects of the assignment specification are designed to ensure that you meet these requirements.

Program Design

A program design is provided in the given structure diagrams. Write your program from these diagrams. The diagrams only show operational program statements. You also need to write include statements, function prototypes, variable and constant definitions, etc, even though these are not shown on the diagrams.

Sustainability Requirement

It is possible to quarter the run time of the program with a simple optimisation. If R1 and R2 have different values, it does not matter which resistor has which value, because the resistors are in series. The same applies to R3 and R4. The R1 loop should step through all the resistor array values from 1.0 to 100 k inclusive, excluding the zero value. But it is only necessary for the R2 loop to step through values from R1 (inclusive) to 100k, plus the zero value. This avoids calculating the same combination twice, with the values of R1 and R2 swapped. The same applies to R3 and R4.

4. Assessment

The assessment of your program for this assignment will be based mainly on (but may not be limited to) the following points, worth one mark each.

This scheme may change slightly, depending on the programs submitted.

1. Compiles without errors or warnings

2. Layout is appropriate (indenting, etc)

3. Commented appropriately

4. Constant definitions used appropriately

5. Variable names/types are appropriate

6. Function prototypes all correct

7. Main title is displayed

8. Function calls all correct

9. Checks for valid input

10. Input uses cin.fail to check input

11. Checks for invalid gain value

12. Loops correctly

13. Calculate loops correctly

14. Looping is optimised

15. Finds the best gain correctly

16. Sustainability implemented

17. Returns results correctly

18. Output displays entered values

19. Displays results

20. Display format is correct

Additional marks will be deducted for the use of global variables, not writing the required functions and using techniques not already taught on this course.

Attachment:- Assignment Files.rar

C/C++, Programming

  • Category:- C/C++
  • Reference No.:- M92478495

Have any Question?


Related Questions in C/C++

Software development fundamentals assignment 1 -details amp

Software Development Fundamentals Assignment 1 - Details & Problems - In this assignment, you are required to answer the short questions, identify error in the code, give output of the code and develop three C# Console P ...

Project - space race part a console Project - Space Race Part A: Console Implementation

Project - Space Race Part A: Console Implementation INTRODUCTION This assignment aims to give you a real problem-solving experience, similar to what you might encounter in the workplace. You have been hired to complete a ...

There are several ways to calculate the pulse width of a

There are several ways to calculate the pulse width of a digital input signal. One method is to directly read the input pin and another method (more efficient) is to use a timer and pin change interrupt. Function startTi ...

What are the legal requirements with which websites must

What are the legal requirements with which websites must comply in order to meet the needs of persons with disabilities? Why is maximizing accessibility important to everyone?

Assign ment - genetic algorithmin this assignment you will

ASSIGN MENT - GENETIC ALGORITHM In this assignment, you will use your C programming skills to build a simple Genetic Algorithm. DESCRIPTION OF THE PROGRAM - CORE REQUIREMENTS - REQ1: Command-line arguments The user of yo ...

Assignment word matchingwhats a six-letter word that has an

Assignment: Word Matching What's a six-letter word that has an e as its first, third, and fifth letter? Can you find an anagram of pine grave. Or how about a word that starts and ends with ant (other than ant itself, of ...

1 implement the binary search tree bst in c using the node

1. Implement the Binary Search Tree (BST) in C++, using the Node class template provided below. Please read the provided helper methods in class BST, especially for deleteValue(), make sure you get a fully understanding ...

Why do researcher drop the ewaste and where does it end

Why do researcher drop the ewaste and where does it end up?

Question 1find the minimum and maximum of a list of numbers

Question: 1. Find the Minimum and Maximum of a List of Numbers: 10 points File: find_min_max.cpp Write a program that reads some number of integers from the user and finds the minimum and maximum numbers in this list. Th ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As