hello i have question in c++ language
Q1: create a class called RightTriangleShape, and it has data member called height which initialized to 3 by the constructor of the class. It has also the following function members:
The functions from 3 to 6 have to print right-triangle shape of entered height.
In: Computer Science
Decipher the following names. They have been enciphered using a Shift cipher with the given key.
Encipher the following words using a Shift Cipher with the given key.
In: Computer Science
You are building a library robot that fetches/places books for a librarian.
list all the important parts (physical) for the robot to properly function (2 points)
List at least 4 functionalities of the robot. (2 points)
What type of wheels/legs are appropriate and why? (1 point)
In: Computer Science
Decipher the following. They have been enciphered using a Shift Cipher with the given key.
Decipher the following. They have been enciphered using a Shift Cipher with the given key.
In: Computer Science
Discussion: Comparing Cloud Computing Features
In: Computer Science
QUESTION 20
Floating-point instruction names begin with the letter F to distinguish them from CPU instructions.
True
False
1 points
QUESTION 21
Which of the following exception conditions are recognized and detected by the floating point unit (FPU)?
a. |
Inexact precision |
|
b. |
Divide by zero |
|
c. |
Numeric overflow |
|
d. |
Numeric underflow |
1 points
QUESTION 22
How many operands can a floating-point instruction have?
a. |
Can have zero operands. |
|
b. |
Can have two operands. |
|
c. |
Can have one immediate operand. |
|
d. |
Must have at least one operand. |
1 points
QUESTION 23
What effect does initializing the floating point unit (FPU) have on the contents of the FPU control word.
a. |
All floating-point exceptions are masked. |
|
b. |
Nothing, the FPU control word is not changed at initialization. |
|
c. |
Calculation precision is set to 80 bits. |
|
d. |
Rounding is set to nearest even. |
1 points
QUESTION 24
How are unsigned comparisons performed by the floating point unit (FPU)?
a. |
Integer subtraction is used. |
|
b. |
A default value is used for the sign. |
|
c. |
Never, floating-point values are implicitly signed. |
|
d. |
Twos-complement is used in the comparison. |
1 points
QUESTION 25
Which of the following statements accurately describes floating point comparisons?
a. |
They incur more runtime overhead than integer comparisons. |
|
b. |
The extreme accuracy of floating-point numbers makes comparing for equality much easier. |
|
c. |
Conditional jumps using the contents of the EFLAGS register are immediately available after a comparison. |
|
d. |
They incur less runtime overhead than integer comparisons. |
1 points
QUESTION 26
What happens by default when you divide a floating-point number by zero?
a. |
An exception is thrown and execution is transferred to the operating system. |
|
b. |
A default value is assigned to the result and execution continues. |
|
c. |
A default value is assigned to the result and en exception is thrown. |
|
d. |
The processor tries to execute an appropriate exception handler. |
1 points
QUESTION 27
Which of the following statements are true regarding the x86 machine instruction format?
a. |
The opcode overrides the deafult operand size. |
|
b. |
A prefix byte is never optional. |
|
c. |
An opcode is never optional. |
|
d. |
Memory displacement bytes are optional. |
1 points
QUESTION 28
Use the following code snippet to identify the contents of ST(1)
after execution has completed:
.data
dblOne REAL8
123.45
dblTwo REAL8
3.1415
dblThree REAL8 234.56
dblFour REAL8 101.01
.code
fld dblTwo
fld dblFour
fld dblOne
fld dblThree
a. |
3.1415 |
|
b. |
101.01 |
|
c. |
123.45 |
|
d. |
234.56 |
1 points
QUESTION 29
Which of the following are fields in the FPU control word?
a. |
Denormal operand exception mask |
|
b. |
Overflow exception mask |
|
c. |
Infinity control |
|
d. |
Rounding control |
1 points
QUESTION 30
Which of the following statements accurately describes the exponent portion of a single precision floating-point number that uses the IEEE format?
a. |
Stored as an 8-bit signed integer. |
|
b. |
Values range from -126 to +127. |
|
c. |
Stored as an 8-bit unsigned integer. |
|
d. |
Stored with a positive bias of 127. |
In: Computer Science
a) Waterfall
b) Prototype
c) V-Model
d) Agile
(the reason for each choice should be at least 100 words)
In: Computer Science
(Complete Using Ubuntu)
Please try each command in Linux system, and get screenshots (you may put multiple commands in one screenshot) which can show how actually each command runs. Also, give a brief description (one or two sentences) for each command. For the commands which have multiple switches/parameters, please try one popular switch/parameter.
Linux Commands: rm,cp ,mv (name), ld, ftp, more, less, cat (date), tar, top, ps (name), kill, df, last, patch, mkdir (date)
In: Computer Science
C++ Create a program that use the linkedbag
3. Develop a program to maintain a list of homework assignments. When an assignment is assigned, add it to the list, and when it is completed, remove it. You should keep track of the due date. Your program should provide the following services: • Add a new assignment. • Remove an assignment. • Provide a list of the assignments in the order they were assigned. • Find the assignment(s) with the earliest due date. 4. We can represent a polynomial as an ordered list of terms, where the terms are ordered by their exponents. To add two polynomials, you traverse both lists and examine the two terms at the current iterator position. If the exponent of one is smaller than the exponent of the other, then insert this one into the result and advance that list’s iterator. If the exponents are equal, then create a new term with that exponent and the sum of the coefficients, and advance both iterators. For example: 3x4 + 2x2 + 3x + 7 added to 2x3 + 4x + 5 is 3x4 + 2x3 + 2x2 + 7x + 12 Write a program to read and add polynomials. You should define a class Term that contains the exponent and coefficient. This class should implement operator< by comparing the values of the exponents.
In: Computer Science
Question 6 (Marks: 35) Structured Query Language (SQL) is a language that is widely used in industry to create, update and query data in relational databases. This question must NOT be done practically (i.e. in the computer room). You are required to write the SQL code in your answer book. Q.6.1 The below sample data in third normal form was provided by a database designer. Answer the below questions using this data. Table: Country Primary key: CountryID (auto number) All fields are mandatory CountryID Name Abbreviation CallingCode 1 South Africa ZA 27 2 Lesotho LS 266 3 Namibia NA 264 4 Egypt EG 20 Table: President Primary key: PresidentID (auto number) Foreign key: CountryID (mandatory) All fields are mandatory PresidentID CountryID Name Surname Year 1 1 Cyril Ramaphosa 2018 2 1 Jacob Zuma 2009 3 3 Hage Geingob 2015 4 3 Hifikepunye Pohamba 2005 18; 19; 20 2020 © The Independent Institute of Education (Pty) Ltd 2020 Page 10 of 11 Q.6.1.1 Write a SQL statement to create the table President. Hint: The sample data should give you an indication of the data types you should use. (5) Q.6.1.2 Write a SQL statement that will count the number of presidents that were inaugurated after 2009. (4) Q.6.1.3 Write a SQL statement to insert the below row into table Country. CountryID Name Abbreviation CallingCode 5 Botswana BW 267 (4) Q.6.1.4 Write a SQL statement to get the list of all the countries from the database, in alphabetical order by country name. Include all the columns from the Country table. (3) Q.6.1.5 Write a SQL statement to get the list of all the presidents with a surname starting with the letter R. Include all fields from the President table. (3) Q.6.1.6 Write a SQL statement to get the list of all the presidents, showing only the name and surname of the president, and the name of their country. (5) Q.6.2 What is the difference between the WHERE and HAVING clauses in SQL statements? (4) Q.6.3 What is the purpose of an index in a SQL database? (1) Q.6.4. The below ERD has been implemented in a SQL database. What will the result be of each of the below queries? Provide an explanation for your answer. 18; 19; 20 2020 © The Independent Institute of Education (Pty) Ltd 2020 Page 11 of 11 Q.6.4.1 (2) Q.6.4.2 (2) Q.6.4.3
In: Computer Science
Define a function drawCircle. This function should expect a Turtle object, the coordinates of the circle’s center point, and the circle’s radius as arguments. The function should draw the specified circle. The algorithm should draw the circle’s circumference by turning 3 degrees and moving a given distance 120 times. Calculate the distance moved with the formula 2.0 × π × radius ÷ 120.0.
Define a function main that will draw a circle with the following parameters when the program is run:
In: Computer Science
Create a greedy solution to the MaxSumSubArray problem, describe it and it's runtime, and prove it's optimal
Code it in python
In: Computer Science
Ask a member of the Human Resources team (or the person who does the hiring) at your work what they see as the key characteristics of a successful manager. In the discussion thread, provide a summary, answering the following questions: 1. What company do you work for and what is the role of the individual you interviewed? 2. What are the key characteristics of a successful manager that your colleague described? 3. What are your thoughts on your colleague’s response? you can use the company lowes
In: Computer Science
In: Computer Science
You are given an array of n elements, and you notice that some of them are duplicates, that is, they appear more than once in the array. Show how to remove all duplicates from the array in time O( n log2 n ).
In: Computer Science