A customer opens an account at a bank with an initial amount. The account number, name, and balance of the customer are generated. The customer can deposit money and withdraw money as per need, this will modify the existing account balance. It should also be checked if the demanded amount is available during withdrawal. The customer can also close the account, the available amount will be paid out. Write a programme to input and display data for 5 customers with the use of Constructor and Destructor.
There is a Ground class that keeps the ground name and city. There is another class Game, that holds information on game names and the date of the game on which the game will be played. The Player class keeps the information about a Player, name, and code. There is a Team class that holds the team name and the total number of players counted.
In a cricket game, a team can have 11 players including 1 captain. The Game will be played between 2 teams on the ground. No player can play the game without a team on the ground. And no game can be played without a ground’s information.
Design it using any possible type of Inheritance. Input information for a game of 2 teams, and display the following:
Ground name City Game Team1 Team2 Captain1 Captain2.
There is a Ground class that keeps the ground name and city. There is another class Game, that holds information on game names and the date of the game on which the game will be played. The Player class keeps the information about a Player, name, and code. There is a Team class that holds the team name and the total number of players counted. Using c++
You're decorating a room with balloons for your friend's birthday party. There are balloons of K different colors, and you have access to infinite amount of balloons of any color. You want to arrange N balloons in a row, with the only condition that no two adjacent balloons can be of the same color, because your friend will dislike it.
How many ways are there to arrange the balloons?
Since the answer can be very large, print it modulo 10^9+7.
How can you transform 6 bit Op-code to 18 bit control memory address? justify your answer with the help of examples?
-length, capacity, speed (must be an integer)
-fuel_capacity, fuel_burn_rate (must be a double)
-name, color (must be a string)
-name
-length
-capacity
-color
-speed
-fuel_capacity
-fuel_burn_rate
What are the various areas where Artificial Intelligence can be used?
What do you understand about Artificial Intelligence?
Yasoda went to a store to buy Ingredients to make a boul of soup.While billing the order,salesperson found that some ingredients are stale.So, he wants to separate the stale ingredients from the rest.You are given the prices of the ingredients,where a negative price value indicates a stale ingredient.Write a program to help the sales person to move the prices of all the stale ingredients to left without changing the relative order of the ingredients.
Input
The first line of input contains space-separated integers.
Explanation
In the example, there are 6 ingredients with prices 11,-12,13,-14,15,16 respectively.
The prices of the stale ingredients in the given list are -12 and -14 in the order of occurence.
So, the output is -12 -14 11 13 15 16.
Sample Input1
11 -12 13 -14 15 16
Sample Output1
-12 -14 11 13 15 16
Sample Input2
21 11 -3 -2 9
Sample Output2
-3 -2 21 11 9
Consider the UML below:
LoanInterest
A bank charges varying interest rates for loans made by students depending on whether they are undergraduate or post-graduate students. Undergraduates are charged 12% on the loan amount and postgraduates 10%. Interest on a small-business loan is 15%.
a) Write the Java code to declare the LoanInterest interface with the method interest().
b) Write the Java code for the definition of the Student class.
c) Write the Java code for the definition of the subclass UnderGrad.
d) Construct objects of each of the subclasses and assign them to an arraylist.