Recent Question/Assignment

4.2 Program 2: Customer service logger
4.2.1 The problem
Write a program that would be used by a customer service officer (CSO) in the Destiny Energy call centre.
When a customer calls they will must either provide an account number or a meter number. The CSO
will enter this into a text field. The program should then display all of the information available and
relevant for this account, in particular:
• the account number;
• whether it is a domestic or commercial account;
• the name of the customer (for domestic) or the name of the business (for commercial);
• the two line address for the customer; and
• the current billing information for the customer, for each meter and tariff, and the total.
All of this information is available in text files as above and another that holds the customer names
and addresses, in a file with records like this:
123 456 789 12
Mr Jarred Bjelke-Newman
234 Desperate Terrace
Leafy West Qld 4034
.
.
.
The program should then provide two text fields where the CSO will enter:
• nature of the customers enquiry; and
• a note about how the enquiry was resolved.
This information, along with the customer’s account number and the current date and time should be
appended to a log file, called log.txt.
4.2.2 Deliverables
(7 marks) The design document should include:
1. mock-ups (not screen shots) of the window;
2. a paragraph that describes how the window is used by its intended user;
3. a paragraph that describes the format of the output text file;
4. a UML class design that shows how the classes in your program will relate to each other;
5. a UML class box that details the important attributes and methods in each new class;
6. a textual description of the purpose of each new class, its attributes and methods; and
7. a textual description of your Java implementation, including:
(a) any special instructions on how to compile and run it; and
(b) what features are incomplete (if any).
(8 marks) The .java files should be:
1. properly indented and spaced out;
2. have header comments that define the purpose of each file;
3. have comments that describe the purpose of all class members, except standard methods like main;
and
4. to facilitate automated testing, the class that contains the main method, must be called Main.
4.3 Program 3: Grid status display
4.3.1 The problem
Power is generated at a power station, and distributed to several sub-stations, and then to many local
transformers, and then to customers via their meters. The power station is at coordinates (100, 100) in
a square grid 500 km by 500 km that covers the area serviced by Destiny Energy. Each substation has a
unique identifying name (S1, S2, ...). Each transformer has a unique identifying name (T1, T2, ...).
The file substations.txt contains the names of the sub-stations and their coordinates:
S1 203 456
.
.
.
The file transformers.txt contains names of all of the transformers, their coordinates and the name
of the sub-station they are connected to.
T1 204 457 S1
.
.
.
The file meters.txt contains all of the meter numbers for all accounts and the transformer to which
they are connected.
123 456 789 T34
.
.
.
The file outages.txt contains the meter numbers that are presently reported to not be receiving
power (blacked out).
Write a program that reads these files and provides a graphical display of the present status of the
grid. It should display the power station, the substations (labelled with their names), the transformers,
and the connections between them. Use colour to indicate their status, either operational, or possibly
faulty.
A report that a given meter is blacked out means that the transformer is probably faulty. If there are
two or more transformers connected to the same sub-station that are probably faulty then the sub-station
is also probably faulty. If two or more sub-stations are probably faulty, then the power station is probably
faulty.
4.3.2 Deliverables
(4 marks) The design document should include:
1. a mock-up (not a screen shot) of the display window;
2. a textual description of the contents of the window;
3. a UML class design that shows how the classes in your program will relate to each other;
4. a UML class box that details the important attributes and methods in each new class;
5. a textual description of the purpose of each new class, its attributes and methods; and
6. a textual description of your Java implementation, including:
(a) any special instructions on how to compile and run it; and
(b) what features are incomplete (if any).
(5 marks) The .java files should be:
1. properly indented and spaced out;
42. have header comments that define the purpose of each file;
3. have comments that describe the purpose of all class members, except standard methods like main;
and
4. to facilitate automated testing, the class that contains the main method, must be called Main.

Looking for answers ?


Recent Questions