Appendix

Object Diagram

Data Dictionary

Account

A single account in the utility company against which transactions can be applied. Only a single type of account is assumed.

Attributes:

Bill Charge

Charge of a customer based on the rates and amount of the electricity usage determined by meter readings. Usage amount between readings, tax, total, and late total (where it is applicable) is calculated. The price (rate) and due date for payment is displayed.

Attributes:

Company

An electricity utility company that provides its customers in certain areas with electricity and charges them periodically (monthly, in our case) based on their usage level determined by meter readings.

Attributes:

Customer

A person or company who buys electricity provided by the utility company. In this case, customers are categorized into residential and industrial type customers because they are charged by different rates.

Attributes:

Meter

An electronic device attached to each account holding customer’s service receiving location such a way that it measures continuously electricity usage in kWh (kiloWatt per hour). A meter’s owner may change in time, i.e., for rented apartments or business locations. A meter is read periodically by an authorized company person.

Attributes:

Meter Reader

An employee of the utility company who is authorized to record meter values of customers in specified areas in certain dates. Meter reader collects all the readings and transfers them into main database system. A meter reader may be assigned to more than one area.

Attributes:

Meter Reading

A reading of a meter (in kWh units) read by an employee authorized by the utility company to periodically read and record the amount of usage displayed by meter for each customer. Each collection of readings by meter readers are transferred to main database system.

Attributes:

Other Charge

A charge applied to an account other than electricity usage, i.e., late fees, some other service and repair fees, etc.

Attributes:

Payment

Payment from a customer based on the charges applied by utility company.

Attributes:

Rates

Unit prices applied to the type of customer (residential or industrial). Different rates are identified by rate codes.

Attributes:

Transaction

A single integral operation on a single customer account. A collection of transactions determines an account balance or final status of an account. Accordingly, transactions reflect bill charges, other charges, and payments to account balance.

Attributes:

Candidate Keys

Data Collector Listing

// Text of project Data Collector written on 8/2/99 at 5:39 PM
// Beginning of file detail.t
detail :=
{viewBounds: {left: -4, top: 56, right: 196, bottom: 160},
viewQuitScript:
// must return the value of inherited:?ViewQuitScript()
func()
begin
if list.listItems[list.Selection][0] <> kCheckMarkChar then
list.listItems[list.Selection] := kCheckMarkChar && substr(list.listItems[list.Selection], 5, nil);
list:SetupList();
list:RedoChildren();
inherited:?ViewQuitScript();
end,
debug: "detail",
_proto: @180 /* protoFloatNGo */
};

theTitle :=
{text: "Static Text",
viewBounds: {left: 8, top: 8, right: 192, bottom: 56},
viewFont: ROM_fontSystem12Bold,
viewJustify: 6,
viewSetupFormScript:
// be sure to call inherited:?ViewSetupFormScript()
func()
begin
self.text := "Meter reading for\n" & TrimString(clone(list.listItems[list.Selection]));
inherited:?ViewSetupFormScript();
end,
debug: "theTitle",
_proto: @218 /* protoStaticText */
};
AddStepForm(detail, theTitle);
StepDeclare(detail, theTitle, 'theTitle);



detail_v72_0 :=
{value: 0,
maxValue: 99999,
minValue: 0,
viewBounds: {left: 48, top: 64, right: 158, bottom: 90},
viewSetupFormScript:
// be sure to call inherited:?ViewSetupFormScript()
func()
begin
self.value := Random(0,99999);
inherited:?ViewSetupFormScript();
end,
_proto: @72 /* protoNumberPicker */
};
AddStepForm(detail, detail_v72_0);




constant |layout_detail.t| := detail;
// End of file detail.t
// Beginning of file main.t
app :=
{viewBounds: {left: 0, top: 0, right: 0, bottom: 0},
viewFlags: 1,
viewFormat: 0,
declareSelf: 'base,
viewJustify: 240,
debug: "app",
viewClass: 74 /* clView */
};

app_v229_0 :=
{title: kAppName,
viewBounds: {left: 0, top: 0, right: 300, bottom: 20},
viewJustify: 22,
_proto: @229 /* protoTitle */
};
AddStepForm(app, app_v229_0);



app_v401_0 :=
{
menuLeftButtons:
[{DoInfoAbout: func() begin
:Notify(3, kAppName, "Data Collector\n\nThe Link Attributes"); end,
_proto: protoInfoButton}],
menuRightButtons:
[
{
icon: @312,
viewJustify: 38,
viewBounds: {left: -42, top: 2, right: -25, bottom:15},
pickActionScript:
func(a)
begin
if a=0 then
list:Open();
else
list:Close();
:Hilite(nil);
end,
pickCancelledScript:
func()
begin
:Hilite(nil);
end,
viewClickScript:
func(a)
begin
if :TrackHilite(a) then
begin
:PopupMenu(["Load Meter List", "Send Meter List"], nil);
end;
else
:Hilite(nil);
end,
_proto: protoPictureButton,
}
],
_proto: @401 /* newtStatusBar */
};
AddStepForm(app, app_v401_0);



app_v218_0 :=
{text: "Meters to be read:",
viewBounds: {left: 8, top: 24, right: 184, bottom: 40},
_proto: @218 /* protoStaticText */
};
AddStepForm(app, app_v218_0);



list :=
{
buttonClickScript:
func(textIndex)
begin
// print("selected index " & textIndex);
detail:Open();
end,
viewBounds: {left: 9, top: 49, right: 311, bottom: 407},
viewLines: 0,
viewSetupFormScript:
func()
begin
self.listItems := Clone(self.listItems);
:SetupList();
end,
listItems:
[
" 20 Main St.",
" 22 Main St.",
" 24 Main St.",
" 26 Main St.",
" 28 Main St.",
" 30 Main St.",
" 32 Main St.",
" 34 Main St.",
" 36 Main St.",
" 38 Main St.",
" 3276 Penny Ln.",
" 3278 Penny Ln.",
" 3280 Penny Ln.",
" 3282 Penny Ln.",
" 876 Blueberry Hill",
" 880 Blueberry Hill",
" 884 Blueberry Hill",
" 888 Blueberry Hill",
" 892 Blueberry Hill",
" 896 Blueberry Hill",
" 900 Blueberry Hill",
" 904 Blueberry Hill",
" 908 Blueberry Hill",
],
viewFont: ROM_fontSystem12,
useScrollers: true,
isShapeList: nil,
viewFlags: 544,
debug: "list",
_proto: @228 /* protoTextList */
};
AddStepForm(app, list);
StepDeclare(app, list, 'list);


detail := LinkedSubview(detail,
{viewBounds: {left: 208, top: 32, right: 304, bottom: 80}, debug: "detail"})
;
AddStepForm(app, detail);
StepDeclare(app, detail, 'detail);


constant |layout_main.t| := app;
// End of file main.t