Ask Question, Ask an Expert

+1-415-315-9853

info@mywordsolution.com

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++

Pa 1 word countertabulating basic document statistics is an

PA #1: Word Counter Tabulating basic document statistics is an interesting exercise that leverages your knowledge of strings, files, loops, and arrays. In this homework, you must write a C++ program that asks the user fo ...

Programming assignment- in this assignment you are

Programming Assignment- In this assignment you are requested to write a C++ program that displays the following colored pyramid on the screen: - The pyramid is 71 characters wide and 21 characters high. - To draw it, you ...

More often than not entrepreneurs will fail several times

"More often than not, entrepreneurs will fail several times before they make it and will usually learn a lot in the process. To help these entrepreneurs to succeed will require a cultural shift. We need to encourage Aust ...

This program involves using stl listsfor this program you

This program involves using STL lists. For this program you will implement three functions whose prototypes are given below: list ::iterator mxIter(list ::iterator first, list ::iterator last); void selectSort(list & aLi ...

Q 1 write a c program to declare two integer one float

Q. 1 Write a C++ program to declare two integer , one float variables and assign 10, 15, and 12.6 to them respectively. It then prints these values on the screen. Q. 2 Write a C++ program to prompt the user to input her/ ...

Computer programmingobjectives1 opening a file reading from

Computer Programming Objectives: 1. Opening a file, reading from file, writing to a file and closing a file. 2. Sequential access files handling. 3. Practice C++ programming problems. Note: Carefully read the following i ...

Programwriteacprogramthatwillasktheuserforthenameofaninputfi

Program Write a C++ program that will: Ask the user for the name of an input file. Read in this name and open that text file for input. Ask the user which of two options they want to do: Read in student data Count lines ...

Text exercise 413 gas mileagebulldrivers are concerned with

Text Exercise 4.13 (Gas Mileage) • Drivers are concerned with the mileage obtained by their automobiles. One driver has kept track of several trips by recording miles driven and gallons used for each trip. Develop a C++ ...

Computer programming assignment-q1 using for loop write a c

Computer Programming Assignment- Q1. Using for loop, write a C++ program that prints out the multiples of 3 up through 75, separated by a blank space.  3 6 9 12 15 18 21 24 27 30 33 36 39 42 45 48 51 54 57 60 63 66 69 72 ...

You need to program a microprocessor that would have a

You need to program a microprocessor that would have a temperature, gas, humidity and PIR sensor connected to it. It would send the data to a PC via a Zigbee and receive commands from the PC via the Zigbee to control mot ...

  • 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

A cola-dispensing machine is set to dispense 9 ounces of

A cola-dispensing machine is set to dispense 9 ounces of cola per cup, with a standard deviation of 1.0 ounce. The manuf

What is marketingbullwhat is marketing think back to your

What is Marketing? • "What is marketing"? Think back to your impressions before you started this class versus how you

Question -your client david smith runs a small it

QUESTION - Your client, David Smith runs a small IT consulting business specialising in computer software and techno

Inspection of a random sample of 22 aircraft showed that 15

Inspection of a random sample of 22 aircraft showed that 15 needed repairs to fix a wiring problem that might compromise

Effective hrmquestionhow can an effective hrm system help

Effective HRM Question How can an effective HRM system help facilitate the achievement of an organization's strate