Category : Files from Magazines
Archive   : CUJ0994.ZIP
Filename : OBJECT.C

 
Output of file : OBJECT.C contained in archive : CUJ0994.ZIP
@C SOURCE 8 = /* Entry Object */

#import <>

@interface Entry : Object
{
double amount;
id acct;
}

+ new;

-setAmount:(double)theAmt;
-(double)getAmount;
-postEntry;
.
.
@end

/* Entry Object */

#import <>

@implementation Entry

+ new
{
[super new];
}
-init;
{
acct = [Account new];
}
-setAmount:(double)theAmt
{
amount = theAmt;
}
-(double)getAmount
{
return amount;
}
-postEntry
{
[acct debitBalance:amount];
//subtract
}
.
@end

/* main */

#import <>

main(void)
{
id Check;


@C SOURCE 8 = Check = [Entry new];
[Check setAmount: 12.56];
[Check setPayee: "MediaScape"];
[Check postEntry];
// [Account postEntry: check];
.
[Check storeOn: "Entry.io"];

}
/* End of File */



  3 Responses to “Category : Files from Magazines
Archive   : CUJ0994.ZIP
Filename : OBJECT.C

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/