Студопедия
Случайная страница | ТОМ-1 | ТОМ-2 | ТОМ-3
АрхитектураБиологияГеографияДругоеИностранные языки
ИнформатикаИсторияКультураЛитератураМатематика
МедицинаМеханикаОбразованиеОхрана трудаПедагогика
ПолитикаПравоПрограммированиеПсихологияРелигия
СоциологияСпортСтроительствоФизикаФилософия
ФинансыХимияЭкологияЭкономикаЭлектроника

Variant 3 - Level 2 – Medium.

Читайте также:
  1. All Words, Level 3 teens
  2. Always use lint free paper towels to wipe fluid off the CVT fluid level gauge.
  3. Approaches to English teaching at primary level
  4. Are you ready for the level?
  5. B) Listen to a dialogue and for questions 1-4 choose the correct variant a, b or c.
  6. B) Understand high-level business requirements
  7. B: item, manufacturer, to refer to, level, a lot of, wish, constant, product mix, to use, guarantee.

Variant 1 - Level 1 – easy.

 

In the attached file you have four icons (jpg files) of different type of fruits. Your task is to create a JFrame and use a Layout Manager to organize the following components: four Buttons with the names – Apple, Banana, Orange and Kiwi.

Implement the program, which will work as follows:

by pressing the Button with the name Apple, a new window must appear where Apple icon must be shown.

by pressing the Button with the name Banana, a new window must appear where Banana icon must be shown.

by pressing the Button with the name Orange, a new window must appear where Orange icon must be shown.

by pressing the Button with the name Kiwi, a new window must appear where Kiwi icon must be shown.

 

Remember, you must follow Java code convention – do not forget to use Author name, version and etc. Comments must exist in your code.

 

Upon completion, submit only the following:

1. Fruits.java

 

Variant 2 - Level 1 – easy.

The task is to implement a simple program that computes the area of a rectangle and records the result into “data.txt” file.

 

Your application must have the following components: JLabel, JTextField, JButton.

 

The following screenshot, shows you the final result of your program:

 

Remember, you must follow Java code convention – do not forget to use Author name, version and etc. Comments must exist in your code.

 

Upon completion, submit only the following:

  1. RectangleProgram.java

 

 

Variant 3 - Level 2 – Medium.

Your task is to create a prototype of ATM (Automatic Teller Machine).

 

The following components must be included in your application:

JLabel,

JTextField

JButton

 

To complete this assessment, you need to implement ATM.java file. The following steps will guide you through this assessment:

 

1. Explore the screenshot provided below:

 

 

2. Run the sample executable by issuing the following command at the command prompt:

C:\>java -jar ATM.jar

 

3. Next, implement the following program:

In the Textfield “Money” user must enter the amount of money by pressing the Button “Add”. Here, it is important to note, that the minimal amount of money that user can place in his/her account is $100. There must be a check, if user entered correct value. If user will enter a symbol and the amount, which is less than $100, then program must print an Error message.

Note: your initial Balance must be $100.

When you press “Withdraw” button the entered amount must be deducted from Balance amount. Here if Balance is enough, then User receives a message that money was withdrawn successfully. The minimum amount of money that User can withdraw is $10. In case if User will enter less than $10, an error message must be printed out. If User enter the value, which is more than Balance, another error message must be printed out.

 

Observe how the program responds to the following types of input:

 

Remember, you must follow Java code convention – do not forget to use Author name, version and etc. Comments must exist in your code.

 

Upon completion, submit only the following:

  1. ATM.java

 


Дата добавления: 2015-11-16; просмотров: 57 | Нарушение авторских прав


<== предыдущая страница | следующая страница ==>
структура html-документа| Variant 4 - Level 2 – Medium.

mybiblioteka.su - 2015-2024 год. (0.005 сек.)