This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: H62SED; Software Eng. Design P Sewell Sept 2006 2006/2007 exam paper solutions General Comment Please note that this is a completely open book exam and moreover the students have complete electronic access to all the example programs used to present the course. Therefore, please take into consideration that successful completion of this exam does not involve large quantities of typing, rather judicious “cut and paste and modification”. Of course the hard part is knowing what to cut and paste from the 100+ pages of example codes! The difference between (a) and (b) is the use of template functions. A solution to (b) is also a solution to (a) but not vice versa. My worked solution is to (b) see below for a listing. (b) only [20 %] Fully functional an additional 5% Correctly making the class interval a template class 5% For these two functions “extra marks” in addition to those below template <class T,class U>interval<T> operator+(const U &p,const interval<T> &q) 5% Correct stream operator for the template class 5% (a) or (b) [8*2.5%+11*5%+10%=85%] Fully functional even if “bootstrapped” 10% Min and max Private 2.5% Read but no write functions for min and max 2.5% interval(T mn,T mx) 5% interval(const T v=0) 5% interval(const interval& v): 5% interval& operator=(const interval& v) 5% interval& operator=(const T& v) 5% ~interval() 2.5% interval operator+(const interval &v) const 2.5% interval& operator+=(const interval &v) 2.5% interval operator-(const interval &v) const 2.5% interval& operator-=(const interval &v)...
View Full Document
This note was uploaded on 08/14/2011 for the course ELECTRONIC H62SED taught by Professor Professorp during the Spring '09 term at Uni. Nottingham.
- Spring '09