#include "media.h"
media::media()
{
owner="blank_at_vt_dot_edu"; //The most important line
title=""; //Known value/length
type=""; //Known value/length
creator=""; //Known value/length
price=-32768; //Known value
avail=""; //Known value/length
}
ui media::print(const ui &emnum,ofstream &ofile)
{
if(owner!="blank_at_vt_dot_edu") //Only if a valid non-blank spot.
{
if(title.length()>0)
ofile<<"Item:\n "<
0)
ofile<<"Media Type:\n "<0)
ofile<<"by:\n "<9)
ofile<<"Price:\n $"<0)
ofile<<"Availability:\n "<0)
title=ntitle;
if(ntype.length()>0)
type=ntype;
if(ncreator.length()>0)
creator=ncreator;
if(nowner.length()>0)
{
ui i=0;
for(;i=0)
price=nprice;
if(navail.length()>0)
avail=navail;
return 1;
}
return 0;
}
//Returns email addy of owner.
string media::eDisp()
{
return owner;
}
ui media::delitem()
{
owner="blank_at_vt_dot_edu"; //The most important line
title=""; //Known value/length
type=""; //Known value/length
creator=""; //Known value/length
price=-32768; //Known value
avail=""; //Known value/length
return 1;
}