Skip to content

Промежуточная аттестация на программе Разработчик онлайн университета GeekBrains | Intermediate certification at the GeekBrains Online University Developer Program

Notifications You must be signed in to change notification settings

novikovadaria/interim_certification_Java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Task 2

It is necessary to write a program for drawing toys in a children's goods store. We try to use OOP and work with files. If you haven't studied any item and don't know how to do it, then you can do it your own way. For example, if someone did not have OOP in the course, then we use lists\arrays\ dictionaries

Desirable functionality of the program:

The program must have at least one class with the following properties: toy id, text name, quantity frequency of falling out of the toy (weight in % of 100)

Method of adding new toys and the possibility of changing the weight (frequency of falling out of the toy) The opportunity to organize a raffle of toys. For example, as follows: Using the method of selecting a prize toy, we get this prize toy and write it to the list\array. This is a list of prize toys that are waiting to be issued. We should also have a method – getting a prize toy. After calling it, we remove the first toy from the list\array and shift the array. And we write this toy to a text file. Do not forget to reduce the number of toys

Задание 2

Необходимо написать программу – розыгрыша игрушек в магазине детских товаров. Стараемся применять ООП и работу с файлами. Если какой-то пункт не изучали и не знаете, как сделать, то можете сделать своим способом. Например, у кого в курсе не было ООП, то применяем списки\массивы\словари

Желательный функционал программы:

В программе должен быть минимум один класс со следующими свойствами: id игрушки, текстовое название, количество частота выпадения игрушки (вес в % от 100)

Метод добавление новых игрушек и возможность изменения веса (частоты выпадения игрушки) Возможность организовать розыгрыш игрушек. Например, следующим образом: С помощью метода выбора призовой игрушки – мы получаем эту призовую игрушку и записываем в список\массив. Это список призовых игрушек, которые ожидают выдачи. Еще у нас должен быть метод – получения призовой игрушки. После его вызова – мы удаляем из списка\массива первую игрушку и сдвигаем массив. А эту игрушку записываем в текстовый файл. Не забываем уменьшить количество игрушек

About

Промежуточная аттестация на программе Разработчик онлайн университета GeekBrains | Intermediate certification at the GeekBrains Online University Developer Program

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages