HELP with a UML diagram

I have this description of an UML diagram to make an implementation file for a shape that we need to display, and one of the functions described as:

The createNewtonImageFile() function should write the image to the file specified by the class variable file name, with a 24-bit depth (by using the appropriate base class functions).

It is given the header base class to create a bitmap, and its .o file, so i have no access to the .cpp file.

so basically i have the header file for bitmapImage.h, bitmapImage.o (these are given). and now i need to work on the header file for newtonTypeClass.h and newtonTypeImp.cpp(this is where i need to code the function described above ,from the base bitmapImage.h)
The question is, what function do i need to call from this header bitmap file, to do what
the description is telling me, and how to call it in the implementation file newtonTypeImp that im coding.

this is the header of the bitmap file, the one that has the required function

#ifndef H_BITMAP_IMAGE_HEADER
#define H_BITMAP_IMAGE_HEADER

class bitmapImage;

/*
A class for working with the Windows Bitmap File Format.
Supports bit depths of 16, 24, and 32 with uncompressed pixel data.

This does not support compressed bitmaps or bit depths of 1,4, or 8.
Compression is rarely used with this file format, though.

Colors can be specified in RGB format (red, green, and blue
intensity values)
Red, Green, Blue colors range from 0-255
(0 -> off to 255 -> full intensity)
For red, it would be (255, 0, 0) and in hex, (0xff0000).
As a single value, 0xff0000 is 16,711,680
For green, it would be (0, 255, 0) and in hex, (0x00ff00).
As a single value, 0x00ff00 is 65,280
*/

class bitmapImage
{
private:
int width, height;
int **pixelData;
void freePixelData();

public:
// create empty bitmap object
bitmapImage();

// create bitmap object from file 'filename'.
bitmapImage(const char* filename);

// create empty bitmap object of size width by height
bitmapImage(int w, int h);

// destructor
virtual ~bitmapImage();

// set (for empty object) bitmap size
void setSize(int width, int height);

// loads uncompressed bitmaps with color depths of
// 16,24, and 32 returns 0, if successfully loaded.
int loadFromBitmapFile(const char*filename);

// saves bitmaps using 24 bit color depth (typical default)
void saveToBitmapFile(const char* filename) const;

// saves using the specified depth of 16, 24, or 32
void saveToBitmapFile(const char* filename, int bitDepth) const;

// get bitmap object height
int getHeight() const;

// get bitmap object width
int getWidth() const;

// get 'red' part of color value
int getRed(int color) const;

// get 'green' part of color value
int getGreen(int color) const;

// get 'blue' part of color value
int getBlue(int color) const;

// convert red, green, and blue values to single color value
int getColorForRGB(int red, int green, int blue) const;

// get contents of (x,y) in image map
int getPixel(int x, int y) const;

// set contents of (x,y) in image map with specified color
void setPixel(int x, int y, int color);

// set contents of entire image map with specified color
void fillWith(int color);

// set contents of rectangle within image map with specified color
void fillRect(int left, int top, int width, int height, int color);

// set contents of (x,y) in image map with specified color in RGB format
void setPixelRGB(int x, int y, int red, int green, int blue);

friend class newtonType;

};

#endif



this is the header file that im working on

class newtonType : public bitmapImage, public complexType {

private:
static const int WD_MIN=100, WD_MAX=10000;
static const int HT_MIN=100, HT_MAX=10000;
static const double A_MIN= -1.0, A_MAX=1.0;
static const double SCALE_MIN=0.0, SCALE_MAX=50.0;
complexType aValue;
double scale;
string fileName;

public:
newtonType();
newtonType(int, int, string, double= 1.0,complexType=complexType(1.0,0.0));
newtonType(const newtonType&);
void readImageFileName();
void setImageFileName(string);
string getImageFileName() const;
void readImageSize();
void setImageSize(int, int);

void getImageSize(int &, int &) const;
void readAvalue();
void setAvalue(complexType);
complexType getAvalue() const;

void readScale();
void setScale(double);
double getScale() const;
void createNewtonImage();
void writeNewtonImageFile();

private:
bool verifyParameters();


};


the function i need to implement is void createNewtonImage(); what function from the bitmapImage do i need to call
and how to call it????
thanks
Topic archived. No new replies allowed.