Use a two-dimensional array in the following problem. Your task is to create a simple Java program which would solve this problem.
You MUST use a 2D array of Strings to solve this problem.
Use a two-dimensional array in the following problem. . Your task is to create a simple Java program which would solve this problem.
You MUST use a 2D array of Strings to solve this problem.
Ask the user which cart of laptops they wish to book. For simplicity sake assume there are 6 laptop carts available for booking.
Ask the user which period they wish to book. Assume there are 4 periods available for when they can book out laptops.
Ask the user the name of the teacher who is booking and store that name into the 2D array at the appropriate location.
Allow the user to loop the program and book another teacher if they wish. If the user picks a slot already used by a teacher it's ok, allow them to overwrite the existing teacher's name in that spot.
Write a function that takes an input parameter as a String. The function should replace the alternate words in it with “xyz” and print it. Words are separated by dots. (Avoid using inbuilt function) If input is “i.like.this.program.very.much” Output will be “i.xyz.this.xyz.very.xyz” in java
by CodeChum Admin
Construct a class called Term. It is going to represent a term in polynomial expression. It has an integer coefficient and an exponent. In this case, there is only 1 independent variable that is 'x'.
more details here. Important!
https://pastebin.com/wMX2BhFk
by CodeChum Admin
Create a new file called Account.java and construct a class called Account, which models a simple bank account. It contains the following members:
More details here, important!
https://pastebin.com/j79JBVgp
1. Date
by CodeChum Admin
Create a new file called Date.java and construct a Date class that models a calendar date with day, month and year. It contains the following members:
more info here.
https://pastebin.com/cGAumGnt
Write a program to take a String as input then display the position of a particular character given as input using indexOf() function of String class. Don't use charAt() function.
Enter a String
Elephants are the largest mammals
Enter character to find: e
Index Position: 0 2 12 16 22
Don't use ArrayList and Character class, use String class functions if necessary
Write a program to take a String as input then display the first and last letter of each word with a condition that if it is having one character then it will remain as it is using only indexOf() function.
For example:
Enter a String
ASia is A conTinEnT
Modified: Aa is A cT
Don't use array[] and split
Develop a Java application that will determine the gross pay for each of
three employees. The company pays straight time for the first 40 hours
worked by each employee and time and a half for all hours worked in
excess of 40 hours. You are given a list of the employees of the company,
the number of hours each employee worked last week and the hourly rate
of each employee. Your program should input this information for each
employee and should determine and display the employee’s gross pay.
Write a program to take a String as input then display the word in one column and its position on the String in another column.
Enter a String
Coronavirus was the Worst pandemic
Coronavirus \t 1
was \t 2
the \t 3
Worst \t 4
pandemic \t 5