1. Homepage
  2. Programming
  3. ENSE504 Introduction to Computing 2022 Assignment 1 C++ Programming

ENSE504 Introduction to Computing 2022 Assignment 1 C++ Programming

Engage in a Conversation
ENSE504Introduction to Computing C++ ProgrammingC++Auckland

ENSE504 Introduction to Computing 2022 Assignment 1
C++ Programming
CourseNana.COM

Assignment Value CourseNana.COM

10% of the total mark for this paper.
Marks will be posted on Canvas as soon as they are all available.
CourseNana.COM

Date and Time Due CourseNana.COM

11:59 PM, Friday 2 September 2022. Requirements CourseNana.COM

This assignment consists of five parts. Write a C++ program for each part with the given specifications and present the screenshot of the output in the report. CourseNana.COM

Submitting Your Assignment CourseNana.COM

You must upload a copy of your assignment report, including the C++ program source codes (.cpp) files and related screenshots, to Canvas by 11:59 PM, Friday 2 September 2022. CourseNana.COM

DO NOT email files to me or give me printed copies of your program. CourseNana.COM

To make a submission to Canvas: CourseNana.COM

  • Make a text file copy of your C++ program code for each part:
    copy the entire contents of your C++ (cpp) file from Visual Studio for each part paste the codes into a WORD file (use Word document),
    add your comments for the main part of each code
    add any screenshots to your report
    save the file as "your name_ID number_Assign1" .doc
  • Log in to Canvas and go to the page for this paper.
  • Click on the "Assignments" button.
  • Click on the "Assessment 1" folder.
  • Submit your word file.
  • After uploading the file, click the "Submit" button before leaving Canvas. The upload will not be complete if you do not click the Submit button.
  • You can upload the file more than once (up to three times). I will only receive the last file you upload. This means that if you upload a file and then decide to modify it, you can upload the modified file, and it will replace the file uploaded earlier.

Plagiarism CourseNana.COM

I expect students will discuss assignments with each other, but each student is responsible for producing their work. DO NOT DIRECTLY COPY OTHER PEOPLE'S WORK. The Turnitin software automatically checks assignment submissions for similarity to other students' work and provides a report of similarities. When plagiarism is detected, disciplinary action may be taken. CourseNana.COM

Details of marking for this assignment for each part: CourseNana.COM

40%: 10%: 10%: 20%: 20%: CourseNana.COM

The code is complete and compiled without errors. A sufficient number of meaningful code comments. Define all variables properly. CourseNana.COM

Appropriate use of I/O operations, conditional statements, and string handling. Display the code output similar to the provided examples. CourseNana.COM

Program 1.1 Simultaneous Calculations [2 marks] CourseNana.COM

Write a C/C++ program to input two (2) real numbers from the keyboard, with a real value between -100 and 100 (inclusive). CourseNana.COM

The program should loop until an appropriate value is entered. Display the word INVALID whenever an incorrect value is entered. CourseNana.COM

The value of the first input can be considered as the CURRENT passing through a resistor in a circuit (in Amps) and the value of the second input as the VOLTAGE across the same resistor (in Volts). CourseNana.COM

The program should calculate the value of the resistor (in Ohmes) and display its absolute value (as the resistor should be positive) with three decimal points. Use both "cout" and "printf" in your code to display the results of the calculation with a format similar to the below example: CourseNana.COM

CALCULATE THE RESISTOR OF A CIRCUIT ================================================== CourseNana.COM

Enter CURRENT in Amps between -100 and 100 (inclusive): 120 INVALID
Enter a value between -100 and 100 (inclusive): 24
CourseNana.COM

Enter VOLTAGE in Volts between -100 and 100 (inclusive): -230 INVALID CourseNana.COM

Enter a value between -100 and 100 (inclusive): 100
====================== The result using cout ========================
The resistor of the circuit with Current of 24.000 Amps, and Voltage of 100.000 Volts is: 4.167 Ohms
CourseNana.COM

====================== The result using printf ========================
The resistor of the circuit with a Current of 24.000 Amps and Voltage of: 100.000 Volts is: 4.167 Ohms
CourseNana.COM

Program 1.2 Simultaneous Equations [2 marks] CourseNana.COM

Write a C/C++ program to calculate values of x and y for angles θ from 0 degrees to 90 degrees (inclusive) in steps of 15 degrees, using the formula: CourseNana.COM

x = 3cos θ y = 2sin θ CourseNana.COM

The cos and sin functions require the angle in radians, and the conversion formula is: CourseNana.COM

???????= ?.??????? ??? CourseNana.COM

Use both "cout" or "printf" in your code to display the results of the calculation with a format similar to the below example: CourseNana.COM

CALCULATE THE VALUE OF x and y ============================= Angle x=3cosTETA y=2sinTETA CourseNana.COM

-------- -------------------------------------- CourseNana.COM

0 3.000 15 2.898 30 2.598 45 2.121 60 1.500 75 0.776 90 0.000 CourseNana.COM

0.000 0.518 1.000 1.414 1.732 1.932 2.000 CourseNana.COM

---------------------------------------------- CourseNana.COM

Program 1.3 Find the smallest and largest numbers CourseNana.COM

[2 marks] CourseNana.COM

A. Write a C++ program to read EIGHT integer numbers and display the smallest and largest ones. CourseNana.COM

A sample of the program output looks like this example: CourseNana.COM

Display the smallest and largest ++ + + ++ + ++ + ++ ++ + ++ + CourseNana.COM

Enter 8 integer numbers: -12
56
123
CourseNana.COM

-345
300
12
-24
135
The Largest Number is: 300 The Smallest Number is: -345
CourseNana.COM

B. Modify the code in problem 1.3 to warn the user if a non-integer character enters. The code should accept only integer values and have an output similar to the below example: CourseNana.COM

3 CourseNana.COM

Display the smallest and largest ++ + + ++ + ++ + ++ ++ + ++ + CourseNana.COM

Enter 8 integer numbers: 345
Enter 7 integer numbers: 567
CourseNana.COM

Enter 6 integer numbers: -25
Enter 5 integer numbers: Q
CourseNana.COM

It is not a number! Enter an integer number: 29
Enter 4 integer numbers:
8
CourseNana.COM

Enter 3 integer numbers:
W
It is not a number! Enter an integer number: 123
Enter 2 integer numbers:
0
Enter 1 integer numbers:
560
The Largest Number is: 567
The Smallest Number is: -25
CourseNana.COM

Program 1.4 Sort numbers CourseNana.COM

Write a C++ program to read four numbers and sorts them in descending order. A sample of the program output looks like this example:
Enter 4 integers
10
CourseNana.COM

230 34 567 CourseNana.COM

567 230 34 10 CourseNana.COM

Program 1.5 Decimal to Hexadecimal Conversion CourseNana.COM

[2 marks] CourseNana.COM

Write a C++ program to get a Decimal number from the user and display the equivalent Hexadecimal value CourseNana.COM

It is expected that the Hexadecial value is stored in an array of char type. CourseNana.COM

The user should get an error message for any unrelated data entry at each stage. If the input is not valid, the user is asked to enter new input, until the input is valid. CourseNana.COM

 [2 marks] CourseNana.COM

A couple of samples of the program output may look like the below examples: CourseNana.COM

Enter a Decimal Number: 2046
Equivalent hexadecimal value of 2046 is: 7FE
CourseNana.COM

Enter a Decimal Number: AB32
It is not a number! Enter a Decimal number: 2049
Equivalent hexadecimal value of 2049 is: 801
CourseNana.COM

Get in Touch with Our Experts

WeChat (微信) WeChat (微信)
Whatsapp WhatsApp
ENSE504代写,Introduction to Computing 代写,C++ Programming代写,C++代写,Auckland代写,ENSE504代编,Introduction to Computing 代编,C++ Programming代编,C++代编,Auckland代编,ENSE504代考,Introduction to Computing 代考,C++ Programming代考,C++代考,Auckland代考,ENSE504help,Introduction to Computing help,C++ Programminghelp,C++help,Aucklandhelp,ENSE504作业代写,Introduction to Computing 作业代写,C++ Programming作业代写,C++作业代写,Auckland作业代写,ENSE504编程代写,Introduction to Computing 编程代写,C++ Programming编程代写,C++编程代写,Auckland编程代写,ENSE504programming help,Introduction to Computing programming help,C++ Programmingprogramming help,C++programming help,Aucklandprogramming help,ENSE504assignment help,Introduction to Computing assignment help,C++ Programmingassignment help,C++assignment help,Aucklandassignment help,ENSE504solution,Introduction to Computing solution,C++ Programmingsolution,C++solution,Aucklandsolution,