Research Paper Doctorate 749 words

Java Application (Parking Simulator) Interface

Last reviewed: February 18, 2005 ~4 min read

Java Application (parking Simulator)

Interface description

Form

When user launches the application the form1 appears. From form1 we can go to parking form by clicking on "Park." Actions of "Park" button will be viewed later. By the use of panel menu we can do the following:

File-exit - exits the application

Change statistics->Coins available- calls from2 that shows coins available in parking machine

Clicking on button "OK" returns user to Change statistics->Add funds calls form3 that allows to add funds to the machine

Form

Clicking "OK" button adds funds inputted into the machine and return the user to the form1. In order to change the available funds user can view menu Change statistics->Coins available;

Change statistics->General statistics

About-> contains information about the program's

Form4

By clicking on park button on form1 user gets to the form4 which shows parking actions. Here the driver has to choose number of hours and pay for them. He can view the indicator of current time and ending time of parking for which he is supposed to pay. Also the form shows the amount that has to be paid and the amount the driver had already paid. If user makes a mistake in inputting data either for parking time or for amount paid he can cancel payment and will be returned to the form1. In the upper section of the window there are coins of different value for parking payment. By clicking on these coins user will pay corresponding amount of money for parking. When payment is complete buttons become unavailable- user can not add any more money. After the payment is complete and user had paid more than it is supposed, he will get a change menu message form5.

Form5.

On the change menu he can choose the way he want to get change in different variants. He can also watch the change available. After he chooses the variant of payment the program checks for available funds and if the funds are unavailable program gives an error message-Form6

Form6

Then the application returns user to form1.

The data about parking payments can be viewed from report file or in the menu: Change statistics->General statistics Form7

Form7

Information about payments is saved into dynamically creating file Report.txt for future analysis and identification of machine's errors.

Possible mistakes in program and the methods used to solve them.

During the developemnrt of the project the developer met set of mistakes, that were fixed. They refer to different aspects of program development:

1) While working with real variables (float type), after calculations unwanted errors appeared, which caused incorrect work of the application:

for example: Amount=Amount+ (float)0.5 caused incorrect result of the following time:

amount=4.

This mistake was corrected in the following way:

Amount=(float)((Math.rint ((double)Amount*100+(double)0,5*100))/100);

So the numbers were transformed to integers and they were used in math operations like integers, then they were transformed back to real. This was one of the most widely spread errors in the program which was corrected successfully.

2) for date defining data was taken from computer's current profile, but current profile could be set incorrectly. That's why the profile was changed on the profile of UK:

formatter = new SimpleDateFormat ("hh:mm," Locale.Default);

formatter = new SimpleDateFormat ("hh:mm," Locale.UK);

3) When data was recorded into text file, it was recorded as one line whch was very inappropriate for analysis and for viewing

This error was fixed by.newLine () method;

4) During file recording in "OK" button code on form of parking payments the file was rerecorded without saving previous operations (every operation was rerecorded even if the application was still working).

You’re 81% through this paper. Sign up to read the full paper.

Sign Up Now — Instant Access Already a member? Log in
130,000+ paper examples AI writing assistant Citation generator Cancel anytime
Cite This Paper
PaperDue. (2005). Java Application (Parking Simulator) Interface. PaperDue. https://www.paperdue.com/essay/java-application-parking-simulator-interface-62253

Always verify citation format against your institution’s current style guide requirements.