Geschreven door studenten die geslaagd zijn Direct beschikbaar na je betaling Online lezen of als PDF Verkeerd document? Gratis ruilen 4,6 TrustPilot
logo-home
Tentamen (uitwerkingen)

COS1512 EXAM PACK

Beoordeling
4,5
(2)
Verkocht
17
Pagina's
105
Geüpload op
30-04-2019
Geschreven in
2016/2017

This exam pack contains exam papers and memorandums from 2014 through to 2017. It has a total of 7 exam papers that have been compiled from UNISA model answers and tutors. Not only is this an excellent learning tool but actual questions have repeated themselves several times. This is a must have to maximize and enhance your marks.

Meer zien Lees minder
Instelling
Vak

Voorbeeld van de inhoud

This EXAM PACK contains the following solutions:



• COS1512 – May/ June 2014
• COS1512 – May/ June 2015
• COS1512 – Oct/ Nov 2015
• COS1512 – May/ June 2016
• COS1512 – Oct/ Nov 2016
• COS1512 – May/June 2017 P1
• COS1512 – May/June 2017 P2

, COS1512/104/2/2015
5 LAYOUT OF EXAMINATION PAPER

This section provides estimates of the marks allocated per question to different sections of the
work. You will need to know all the work which has been outlined in Tutorial Letter 101. The mark
allocation will approximately be as follows:

Question 1: +/- 4 marks: C strings
Question 2: +/- 4 marks: recursion
Question 3: +/- 5 marks: pointers
Question 4: +/- 27 marks: class definition and implementation
Question 5: +/- 10 marks: file processing
Question 6: +/- 15 marks: inheritance
Question 6: +/- 10 marks: vectors and templates

Please note that we test all the work. This outline points out the most important aspects tested in
each question.


6 PREVIOUS EXAMINATION PAPER
The examination paper which is used for this section is on myUnisa. It is the May/June 2014
examination paper. Please download the examination paper. We have only included the
memorandum for the examination.

Memorandum for May 2014 Exam




double computeBill(double price)
{
return price * 1.14;
}
double computeBill(double price, int quantity)
{
return (price * quantity) * 1.14;
}
double computeBill(double price, int quantity, double coupon)
{
double total = (price * quantity - coupon) * 1.14;
return total;
}



int main()
{
double price = 12.99;
int quantity = 10;
double coupon = 5.00;

, cout << "Amount = " << computeBill(9.99);
cout << "Amount = " << computeBill(9.99, 10);
cout << "Amount = " << computeBill(9.99, 10, 50.00);
}




Rectangle duplicate (Rectangle & rect1 , Rectangle & rect2 )
{
rect1.width = rect2.width;
rect1.height = rect2.height;
}



friend Rectangle duplicate (Rectangle & rect1, Rectangle & rect2);

duplicate (foo, bar);




3.1 SS.push_back("The number is 10"); (1)

3.2 cout << SS.size() << endl; (1)
3.3 cout << SS[2] << endl; (1)
3.4 int ii; (2)
for(ii=0 ; ii < SS.size() ; ii++)
{
cout << SS[ii] << endl;
}




4.1 if (n == 0) (1)
4.2 We are busy with recursion111 (1)




1. #include <fstream> // file i/o

2. ifstream input;

3. input.open(name);
if(!input)
{
cout << "Cannot open file " << name << " Aborting." << endl;


6

, COS1512/104/2/2015
exit (1);
}

4. while(input)

5. input.close();




The declaration int * pOne; declares pOne to be a pointer pointing to an int value. (1)
The declaration int vTwo; declares pTwo as an int value. (1)
The statement int * pThree = &vTwo; declares a pointer to an integer and initializes it with the
address of another variable of vTwo. (1)

The declaration int * q = p; declares q to be a pointer pointing to the same int to which p points.
The assignment n = *p; assigns to n the int to which p points. (2)

6.2.2 The declaration int & r = n; declares r to be a reference for the int variable n. (2)
The assignment p = &n; assigns the address of n to the pointer p.

6.3.1 123456789
6.3.2 10 1 2 3 4 5 6 7 8 9
6.3.3 0123456789




class Product
{
public:
Product();
Product(long, double, double, long);
void display();
double retailPrice();
void modify();
Product increment();
Product decrement();
private:
long id;
double price;
double markup;
long number;
};



#include <iostream>

Geschreven voor

Instelling
Vak

Documentinformatie

Geüpload op
30 april 2019
Aantal pagina's
105
Geschreven in
2016/2017
Type
Tentamen (uitwerkingen)
Bevat
Vragen en antwoorden

Onderwerpen

€9,39
Krijg toegang tot het volledige document:

Verkeerd document? Gratis ruilen Binnen 14 dagen na aankoop en voor het downloaden kun je een ander document kiezen. Je kunt het bedrag gewoon opnieuw besteden.
Geschreven door studenten die geslaagd zijn
Direct beschikbaar na je betaling
Online lezen of als PDF

Beoordelingen van geverifieerde kopers

Alle 2 reviews worden weergegeven
6 jaar geleden

5 jaar geleden

4,5

2 beoordelingen

5
1
4
1
3
0
2
0
1
0
Betrouwbare reviews op Stuvia

Alle beoordelingen zijn geschreven door echte Stuvia-gebruikers na geverifieerde aankopen.

Maak kennis met de verkoper

Seller avatar
De reputatie van een verkoper is gebaseerd op het aantal documenten dat iemand tegen betaling verkocht heeft en de beoordelingen die voor die items ontvangen zijn. Er zijn drie niveau’s te onderscheiden: brons, zilver en goud. Hoe beter de reputatie, hoe meer de kwaliteit van zijn of haar werk te vertrouwen is.
neilgovender2020 University of South Africa (Unisa)
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
93
Lid sinds
6 jaar
Aantal volgers
76
Documenten
11
Laatst verkocht
1 jaar geleden

3,9

14 beoordelingen

5
6
4
4
3
2
2
0
1
2

Populaire documenten

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Veelgestelde vragen