Question
An Alternative ....... Visual Basic Format! Recently, there has been a noticeable increase in the demand on cryptocurrency investments. As a result, many online companies
An Alternative ....... Visual Basic Format!
Recently, there has been a noticeable increase in the demand on cryptocurrency investments. As a result, many online companies have created electronic exchange apps to facilitate the process of buying and selling cryptocurrencies online. For this assignment, you are asked to mimic a simple cryptocurrency exchange applications
Make the title of the form XXX.
Disable the textboxes under Buy/Sell.
Make the GroupBox invisible (it is visible in the figure so you can see its content).
b. A user must deposit money into the exchange before being able to buy any cryptocurrencies. When the Deposit button is clicked, the program should first check if the value entered in the deposit textbox is valid (i.e. a numeric positive value). Next, it will add the entered amount to the current balance, which appears in the large label (The starting balance is $0.00). The new updated balance should appear in the label and the textbox should be cleared.
c. The Groupbox should become visible when you click on the Exchange button.
d. After depositing an amount into the exchange, the user can begin investing with different types of cryptocurrencies. Each cryptocurrency has an exchange rate as shown in the figure above. When the user decides to buy or sell a certain cryptocurrency he/she will check the checkbox of that cryptocurrency, and the text box associated with that currency will become enabled. When the user unchecks the checkbox, the textbox becomes disabled.
e. Once the user checked the checkboxes of the desired cryptocurrencies, and the textboxes becomes enabled, now the user can start entering the amounts he/she wants to buy or sell from each currency. If it is a buying process, the Buy button will be clicked. If it is a selling process, the Sell button will be clicked. First - When the Buy button is clicked: (30 points) o The program must check that the cost of all required currencies is less than the users balance. For example: if the exchange account has a balance of $1000, and the user picked 1 Ethereum and 1 Litecoin, the cost will be (843.36 + 208.45 = 1,051.81). So, the sale will be denied because the cost is more than the balance (1,51.81 > 1000). In such case, the program should show an error message and quit. o If the total cost was less than the account balance, the program will call a sub procedure named0 Buying that will perform the following tasks: - The total cost amount will be subtracted from the balance. - The label under quantity will change accordingly. For example: if the user bought 2 Bitcoins, the label under quantity for Bitcoin will increment by 2. - The labels under Totals will be updated accordingly. The total is calculated by multiplying Quantity x Rate for each cryptocurrency. - All textboxes under Buy/Sell will be cleared and all checkboxes will be cleared (this will result in disabling the textboxes if you programmed part e correctly). Second When the Sell button is clicked:
o The program must check if the user has enough of the currency he/she is willing to sell. For example, if the user has 2 Bitcoins and entered 3 in the textbox, the program will show an error message and quit.
o If the user has enough to sell of each currency, the program will call a sub procedure named Selling that will perform the following tasks: - The balance will be incremented by the amount of sale. The amount of sale is calculated by multiplying the number entered in the textbox X rate for each selected currency. - The quantity will be decremented accordingly, for example: if the user had 3 Bitcoins and sold 1 then the Bitcoin quantity will become 2. - The Totals will be updated accordingly. The new total for each currency can be calculated by multiplying Quantity X Rate. - All textboxes under Buy/Sell will be cleared and all checkboxes will be cleared (this will result in disabling the textboxes if you programmed part e correctly).
f. When the Done button is clicked: All text boxes under Buy/Sell should be cleared. All checkboxes should be cleared. All textboxes under Buy/Sell should be disabled. The Groupbox becomes hidden.
g. Exchange rates change automatically based on supply and demand. However, since this is only a mimic of exchange reality, we will be able to update the exchange rates manually. When the Update Rates button is clicked, 4 input boxes will appear one at a time. Each input box will ask for a new rate for one of the cryptocurrencies. The labels under Rate should be updated accordingly.
Balance $0.00 Cryptocurrency Btcoin ? Bicon Cash Bhereum Litecoin Deposit Buy/Sell Rate Quantity Totals 11261.01 1,24599 0 843 36 0 208 45 Exchange Buy Sell Done Balance $0.00 Cryptocurrency Btcoin ? Bicon Cash Bhereum Litecoin Deposit Buy/Sell Rate Quantity Totals 11261.01 1,24599 0 843 36 0 208 45 Exchange Buy Sell DoneStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started