Ask Question, Ask an Expert


Ask C/C++ Expert

Home >> C/C++

problem 1: Select appropriate pre-defined data types.

Use simple input/output and appropriate operators withthe selected data.

Use appropriate selection structures and loop structures for the given task.

Produce programs to desired standards

prepare, compile and run the following two programs using C/C++ programming method. Select the appropriate defined data types to carry out the calculations:

A) Program 1:

a) Generate a list of sine and cosine values for angles from 0o to 360o using float (real) data types.
b) Knowing that processors deal with radians and not degrees, remember to change values from degrees to radians then convert values back to display in degrees.
c) Use looping such as for and while statement.
d) Use conditions (if statement) to avoid dividing on zero and limit the output values between e-5 to e+5.
e) Using simple input and output statements, input program’s input data from the screen and print out the output data into the screen.

B) Program 2:

a) Generate a list of complex numbers using the following limits:

  • Real values from 0 to 10 using a step of 2 (2 increment).
  • Imaginary values from 0 to 10 using a step of 2 (2 increment).

b) find out the amplitudes and the angles in degrees

c) Using simple input and output statements, input program’s input data from the screen and print out the output data into the screen

For both programs, provide source codes, screenshots for input/output data and screenshots of running programs

problem 2: Construct a program from a design and use appropriate functions/procedures.

Demonstrate the effect of scope and life-time of variables.

Pass data effectively between modules

For the engineering problem given in this task produce the followings:

A) Construct a C/C++ program and use appropriate functions and procedures.
B) Demonstrate the effect of changing variables, constants and complex data types on the time required to run the program.
C) Program should be constructed using statements and modules within the main program. Data should be passed effectively between different parts of the main program

The engineering problem:

A series R = 100, L = 10mH and C = 10µF connected to a sinusoidal AC power supply of 100V/45O. Construct the C/C++ program to find out the current of the circuit as a complex quantity in Polar and Cartesian forms. Produce your calculations as function of the frequency. The frequency changes from 100Hz to 2kHz using a 100Hz steps. The input of your program should be the given data and the output data must include the followings:

• Supply voltage as complex quantity
• Inductive reactance, capacitive reactance and impedance as complex quantities
• Circuit current as complex quantity
• All required quantities should be produced as function of the frequency

Formulas that equations can be used to determine the values of your variables are given in the following table:

22_values of variable.jpg

problem 3: Produce user documentation for a completed programming application including the user interface design.

Develop technical documentation for a pre described program application

For the program developed in quetion 2:

A) Produce a complete documentation including the user interface. This must be used as user guide to show the input data required and their types, their range and a display of the source code name the user interface should also display the choice of output data and a user friendly display of the output data.
B) Produce a technical document that gives a clear guidance to the program user on the technical problem solved, the constants and variables being dealt with.

problem 4: Demonstrate discrimination between semantic and syntax errors.

Produce test documentation.

Successfully construct and use test data and schedules to detect logic errors.

Use appropriate techniques for detecting errors.

A) Programming errors can be classified as semantic and syntax errors. Define both types of errors and illustrate the difference between them. Produce a list of both types of errors that you faced in the program produced in problem 2.
B) Produce a test documentation showing a procedure for the user to follow in testing the program before using it.
C) Change some of the variables in the developed program of problem 3 to illustrate at least one logic error in the program. On compiling and running the program, illustrate the method used to detect the program errors. describe how errors are found and how are they corrected.

C/C++, Programming

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

Have any Question? 

Related Questions in C/C++

Programming in c assignmentwrite a c program that computes

Programming in C Assignment Write a C program that computes and outputs the current age of the United States in days (you can use 1776 as theUS founding year). You don't have to worry about fractional years or leap years ...

Write a c program that prompts the user to enter a line of

Write a C program that prompts the user to enter a line of text (up to 50 characters). It should then convert the text entered to uppercase letters and then to lowercase letters, and then to Sentence case. Your program s ...

Assignmentthis assignment gives you the opportunity to

Assignment This assignment gives you the opportunity to practice array of pointers, linked lists and self referential structures. Write a program that initializes two parallel arrays as follows: char * String[] = { "Abbi ...

Assignmentbullwrite the code for each lab

Assignment • Write the code for each lab assignment. • Submit the lab in a single zip file in the online course shell. The lab must contain all .cpp files, along with any additional files that may be necessary for your p ...

Programming assignment 5write a c program that allows the

PROGRAMMING ASSIGNMENT #5 Write a C program that allows the user to make some banking transactions. The program should first prompt the user to enter the current balance of his/her bank account (in dollars and cents, not ...

Programming cc assignmentsyoull need to download this to

Programming C/C++ assignments You'll need to download this To write the program. The programs will be written using the Microsoft Visual C++ Express Edition IDE (Integrated Development Environment), which can be download ...

1 we know that from ece 109 to calculate the

1. We know that from ECE 109, to calculate the equivalent resistance of a network of resistors in series in parallel are given by: Write a C++ program that asks the user to input values for resistors (as many as they wou ...

C projectphase 11- you need to take input from user study

C project Phase 1 1- You need to take input from user study year (proper value check from 1 to 4) 2- Take input semester (proper value check 1 to 8) 3- Calculate GPA (use Loop, calculate GPA for semester 1,2,3...) Exampl ...

Design implement test and debug a c program to simulate the

Design, implement, test, and debug a C# program to simulate the rolling of two dice 100 times. Whenever the two dice display the same number, the program should show the roll sequence number (e.g. the 10th roll) and the ...

Write a program to draw a symmetric shape of your own using

Write a program to draw a symmetric shape of your own using C++ user-defined functions and arrays. The program should draw a shape in its original and opposite forms (black and white and then white and black). Please con ...

  • 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

WalMart Identification of theory and critical discussion

Drawing on the prescribed text and/or relevant academic literature, produce a paper which discusses the nature of group

Section onea in an atwood machine suppose two objects of

SECTION ONE (a) In an Atwood Machine, suppose two objects of unequal mass are hung vertically over a frictionless

Part 1you work in hr for a company that operates a factory

Part 1: You work in HR for a company that operates a factory manufacturing fiberglass. There are several hundred empl

Details on advanced accounting paperthis paper is intended

DETAILS ON ADVANCED ACCOUNTING PAPER This paper is intended for students to apply the theoretical knowledge around ac

Create a provider database and related reports and queries

Create a provider database and related reports and queries to capture contact information for potential PC component pro