#1 2023-05-25 19:13:12

Selen
Учасник
Зареєстрований: 2017-01-02
Повідомлень: 88

написать программу на Java

Приветствую.
надо написать программу на джава.
вот тз.


GUIProject III
14 V 2023
1 Project Description
The first SMS in history was sent on December 3, 1993. Since then, the vast majority of
mobile devices have the ability to send messages of this type. The result of this project
will be an application simulating the transmission of messages from the sender (mobile
device) through a series of network layers (intermediate stations) to the recipients (mobile
devices).
Using the SWING framework, create a multithreaded window application simulating
the transmission of SMS messages from senders to recipients. The visual layer of the
application will consist of 3 interactive panels (objects inheriting from the JPanel class),
arranged by the automatic BorderLayout layout.
The extreme left panel will be dedicated to displaying sending devices. This panel will
consist of a JScrollPane component placed in the central part and a JButton "Add"located
at the bottom of the panel. Inside the JScrollPane component, a JPanel will be placed,
which will use a vertical BoxLayout to arrange all visual components representing "virtual
sending devices"(VBD).
Pressing the "Add"button in the sending devices panel will display a dialog box allo-
wing the user to enter and confirm a short text message. Based on the entered message,
an object implementing a virtual sending device (VBD) will be created, whose instances
will be visualized in the panel.
The visualization of the VBD object will be based on a JPanel component and will
consist of components described by JLabel:
• JSlider – specifying the frequency of sending messages;
• JButton – allowing to terminate the VBD’s work (which will result in removing the
device);
• JTextField – non-editable field representing the device number;
• JComboBox – allowing to indicate the WAITING or ACTIVE state, based on which
the thread implementing this VBD will be able to suspend or work.
The extreme right panel will be dedicated to displaying receiving devices. The struc-
ture of this panel will be analogous to the structure of the sending devices panel. However,
it will present virtual receiving devices (VRD), whose objects will be created as a result
of pressing the "Add"button.
The visualization of the VRD object will consist of components described by JLabel:
• JButton – allowing to terminate the VRD’s work (which will result in removing the
device);
• JLabel – showing information about the number of received messages;
• JCheckBox – specifying whether the information about the number of received
messages should be removed every 10 seconds if checked or not otherwise.
The middle panel will allow the visualization of base stations (BTS) in the extreme
layers and controller stations (BSC) in the intermediate layers. This panel will consist of
1 z 3
GUIProject III
14 V 2023
a JPanel component placed in the central part, containing horizontally oriented visuali-
zations of BTS and BCS layers, and buttons for adding and removing BSC layers at the
bottom.
Each BTS or BSC layer is implemented by a JPanel in which visual components
representing a single station (BTS or BCS) are arranged vertically.
Each BTS or BSC station is represented as a JPanel component, consisting of com-
ponents:
• JLabel – representing the next unique and non-editable station number;
• JButton – allowing to terminate the work of the station (which will result in remo-
ving the station).
2 Application operation
The user of the application creates a certain number of VBD objects, each of which is a
separate thread and immediately starts transmitting the message entered during creation.
As according to the standard, each SMS has the encoded sender and recipient numbers
along with the message, a random VRD element is chosen as the recipient. The created
SMS is passed to the BTS station with the least number of waiting SMSs.
The application in its running state has three layers. There must be at least one
intermediate layer of BSC controllers between the input layer and the output layer. The
number of intermediate layers depends on the user’s actions in the application, who can
add or remove a layer using the keys. Each newly created communication layer will be
created with one BSC, while removing a layer will result in no longer accepting messages
by that layer and immediately passing messages from all BSCs, skipping the transmission
timers.
The transmission of an example SMS message will look as follows:
V BD → BT S → BSC → · · · → BT S → V RD
Assume that:
• each BSC will store the SMS for a random timer (from 5 to 15 sec) and then pass
it on to the next layer;
• each BTS will pass the SMS to the next layer or VRD after 3 seconds;
• the BTS/BSC with the least number of SMSs is always selected when passing the
SMS to the next layer;
• if the number that the SMS was sent to does not exist, the program will raise an
exception and the system will handle it by displaying a message in the console.
General assumptions:
• the messages are transmitted in the form of PDU defined in the standards of the
European Telecommunications Standards Institute (ETSI) described in the GSM
03.38, GSM 03.40, GSM 03.41 documents, while the attached document describing
the encoding is only an excerpt from these standards;
2 z 3
GUIProject III
14 V 2023
• when the application is closed, a binary file will be created representing information
about each VBD, containing information about the number of sent messages and
the message that was sent.
3 Formal Requirements
The solution in the form of a delivered application should be presented by May 28th,
2023 on the Teams platform.
The project requires the use of all topics discussed during lectures and exercises,
including object-oriented programming, collections, exceptions, threads, input/output,
and many others. At the same time, no external libraries can be used to ensure that all
code will be based only on the standard Java library.
To ensure proper and safe execution of concurrent operations, it is necessary to im-
plement them using threads (Thread or Runnable). The use of other tools, such as Timer
or Executor, will not be accepted.
To properly implement the project, two versions of the program must be provided:
• a single file named SxxxxxProject03.java, which will contain the entire source
code of the program, along with external classes. This file should compile without
errors;
• a compressed archive named SxxxxxProject03.zip, containing all project files,
including source files.
It should be noted that the SxxxxxProject03.java file should be self-contained and
include all necessary external classes, as well as compile without errors. The archive
should contain the complete project, including source files.
Note: failure to meet the formal requirements will result in the obtained grade being
multiplied by a coefficient of 0.3.
3 z 3

Остання редакція Selen (2023-05-25 19:14:05)

Неактивний

Швидке повідомлення

Введіть повідомлення і натисніть Надіслати

Підвал форуму