Java program The program needs to implement all ofthese in any sort of way selec
ID: 3836375 • Letter: J
Question
Java program The program needs to implement all ofthese in any sort of way selection structures,loops, methods, arrays, classes, must read and write files and must do input validations. It is also fundamental that all the program is a GUI. This program is a library which must simulate 4people buying or selling their books Parts. 1. Login/register system, that asks the user for his/her name, username, and password to create an account. This data must be stored on files. Must allow the user to sign in to his account, and ifa new user wants to create an account the program must check for an existing and must not allow to create an account that is already there. 2. Seller: Allow the user to upload a photo of the book also in this step the program must ask for the name of the book, its price, and email or cellphone to be contacted. 3. Buyer: must be able to see all the information from each person that has uploaded a book to sell 4. Must have a payment system and receipt of the transaction
Explanation / Answer
We know that Java provides a data structure, the array, which stores a fixed-size sequential collection of elements of the same type.
An array is used to store a collection of data, but it is often more useful to think of an array as a collection of variables of the same type.
Syntax:
As we know Java method is a collection of statements that are grouped together to perform an operation. When you call the System.out.println() method, for example, the system actually executes several statements in order to display a message on the console.
To create method
Considering the following example to explain the syntax of a method
The syntax shown above includes
modifier
returnType
nameOfMethod
Parameter List
method body
After this we have to move for loop controls A loop statement allows us to execute a statement or group of statements multiple times and following is the general form of a loop statement in most of the programming languages.
Following code is example for loop statement:
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.