mnomanme / functionArrayJava

A basic function and array problems

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Java Function Array Problem

Question

    1. Take input from a user and check if the number exists in the array.
    Let the array is [1,3,5,7,2,4,6,8]
    Input: 7
    Output: Found in the position 3
    Input: 9
    Output: Found no element
    
    1. Input an amount from the user and find out the number of notes from input amount in given array
    [1000,500,100,50,20,10,5,2,1]
    Input: 1256
    Output:
    1000 1
    100 2
    50 1
    2 3
    
    1. Suppose, in a company , here are some employee salaries in an array [35000, 25000, 28000, 32500, 44000, 32800] Find out the 3rd highest salary
    1. Create your todays bazar list/pocket expenditure which includes the item name and price. Then create a function named searchItem(String item) which will be used to search any item from your HashMap and return the price. If found no item, then print message as "No item found" and another function named totalSum() which will return total price of items.
    1. Take 5 numbers from users in an array. Then find out the average number, how many even and how many odd numbers using these functions: average(), countEvenNumbers(), countOddNumbers()
    1. Suppose a software system excepts valid credentials from user to logged in to the system. if the user inputs wrong password for 3 times, system will say that "Your user has been temporary locked". Let the username: admin, password: adm1n

Solved

    1. NumberArray
    1. CountNotes
    1. HighestSalary
    1. BazarList
    1. AverageOddEven
    1. UserAuthentication

About

A basic function and array problems

License:MIT License


Languages

Language:Java 100.0%