100% tevredenheidsgarantie Direct beschikbaar na betaling Zowel online als in PDF Je zit nergens aan vast
logo-home
COS1512 ASSIGNMENT 4 QUIZ 2024. CLOSES 24/09/2024 €2,70   In winkelwagen

Tentamen (uitwerkingen)

COS1512 ASSIGNMENT 4 QUIZ 2024. CLOSES 24/09/2024

 71 keer bekeken  13 keer verkocht
  • Vak
  • Instelling

COS1512 ASSIGNMENT 4 QUIZ 2024. CLOSES 24/09/2024. GET A STRONG PASS-FORTIS PASSUM

Voorbeeld 4 van de 53  pagina's

  • 25 augustus 2024
  • 53
  • 2024/2025
  • Tentamen (uitwerkingen)
  • Vragen en antwoorden
avatar-seller
COS1512 ASSESSMENT 04 SEMESTER 2 2024



Closes: TUESDAY 24 SEPETEMBER 2024




PASS WITH DISTINCTIONS. FORTIS PASSUM
FOR FURTHER ASSISTANCE WITH ECONOMICS,
MANAGEMENT, ACCOUNTING, TAXATION EDUCATION@ LLB
MODULES.


CALL/WHATSAAP0816884518/0816884519
EMAIL: info@fortispassum.co.za
admin@fortispassum.co.za

, 1. UNISA
2. 2024
3. COS1512-24-Y
4. Welcome Message
5. Assessment 4



Quiz

Assessment 4
Open course index
Open block drawer
Started on Thursday, 22 August 2024, 7:19 PM
State Finished
Completed on Thursday, 22 August 2024, 7:38 PM
Time taken 19 mins 23 secs
Grade Not yet graded
Question 1
Correct
Mark 1.00 out of 1.00

Flag question

Question text
This question is based on question 1 in the written Assignment 4.
The program in question 1 of the written assignment, contains an incomplete recursive
function raised_to_power(). This function returns the value of the first parameter number of
type float raised to the value of the second parameter power of type int for all values
of power greater than or equal to 0.
The correct function header for the function raised_to_power() is
Select one:

float raised_to_power(float number, int power)


int raised_to_power(float number, int power)

,float raised_to_power(int number, float power)


float raised_to_power(float number, float power)
Feedback
Your answer is correct.
The correct answer is: float raised_to_power(float number, int power)

Question 2
Correct
Mark 1.00 out of 1.00

Flag question

Question text
This question is based on question 1(b) in the written Assignment 4.
The program in question 1 of the written assignment, contains an incomplete recursive
function raised_to_power(). This function returns the value of the first
parameter number of type float raised to the value of the second parameter power of
type int for all values of power greater than or equal to 0.
Based on the fact that any value raised to the power of 0 is 1, the base case for this function is
Select one:

else if (power == 0)
return (1.0);


else if (power == 1)
return (1.0);


else if (power > 0)
return (1.0);


else if (power == 0)
return (number * raised_to_power(number, power - 1));
Feedback
Your answer is correct.
The correct answer is: else if (power == 0)
return (1.0);

Question 3
Incorrect
Mark 0.00 out of 1.00

, Flag question

Question text
This question is based on question 2(a) in the written Assignment 4. Question 2 included a code
fragment that you had to answer questions on. This is an extract from the code fragment:
6: class A
7: {
8: private:
9: int x;
10: protected:
11: int getX();
12: public:
13: void setX();
14: };
15:
16: int A::getX()
17: {
18: return x;
19: }
20:
21: void A::setX()
22: {
23: x=10;
24: }
In this code fragment, is line 18 a valid access?
Select one:
True
False
Feedback
The correct answer is 'True'.

Question 4
Incorrect
Mark 0.00 out of 1.00

Flag question

Question text

Voordelen van het kopen van samenvattingen bij Stuvia op een rij:

√  	Verzekerd van kwaliteit door reviews

√ Verzekerd van kwaliteit door reviews

Stuvia-klanten hebben meer dan 700.000 samenvattingen beoordeeld. Zo weet je zeker dat je de beste documenten koopt!

Snel en makkelijk kopen

Snel en makkelijk kopen

Je betaalt supersnel en eenmalig met iDeal, Bancontact of creditcard voor de samenvatting. Zonder lidmaatschap.

Focus op de essentie

Focus op de essentie

Samenvattingen worden geschreven voor en door anderen. Daarom zijn de samenvattingen altijd betrouwbaar en actueel. Zo kom je snel tot de kern!

Veelgestelde vragen

Wat krijg ik als ik dit document koop?

Je krijgt een PDF, die direct beschikbaar is na je aankoop. Het gekochte document is altijd, overal en oneindig toegankelijk via je profiel.

Tevredenheidsgarantie: hoe werkt dat?

Onze tevredenheidsgarantie zorgt ervoor dat je altijd een studiedocument vindt dat goed bij je past. Je vult een formulier in en onze klantenservice regelt de rest.

Van wie koop ik deze samenvatting?

Stuvia is een marktplaats, je koop dit document dus niet van ons, maar van verkoper distinctiongateway. Stuvia faciliteert de betaling aan de verkoper.

Zit ik meteen vast aan een abonnement?

Nee, je koopt alleen deze samenvatting voor €2,70. Je zit daarna nergens aan vast.

Is Stuvia te vertrouwen?

4,6 sterren op Google & Trustpilot (+1000 reviews)

Afgelopen 30 dagen zijn er 81849 samenvattingen verkocht

Opgericht in 2010, al 14 jaar dé plek om samenvattingen te kopen

Start met verkopen
€2,70  13x  verkocht
  • (0)
  Kopen