How to use array to record the student profiles ?
How to Create a Student Class?
Draw a flowchart that prompts a professor to enter grades for five different courses each for 10 students. Prompt the professor to enter data for one student at a time, including student ID and course data for five courses. Use prompts containing the number of the student whose data is being entered and the course number—for example, “Enter ID for student #s”, where s is an integer from 1 through 10, indicating the student, and “Enter course ID #n”, where n is an integer from 1 through 5, indicating the course number. Verify that the professor enters only A, B, C, D, or F for the grade value for each course. Save the file as InputGrades.java.
Create a class “StudentName” with a main function. Take a variable of integer data type from user and store its value into variable name “rollno”. Print the name of specific student using switch statements.
Hint: Use 4 different cases and one default. The value of cases should be
Case 10
Case 11
Case 12
Case 13
Create a class “StudentName” with a main function. Take a variable of integer data type from user and store its value into variable name “rollno”. Print the name of specific student using switch statements.
Hint: Use 4 different cases and one default. The value of cases should be
Case 10
Case 11
Case 12
Case 13
Hallindrome
Given a string S. Let us divide 5 into two equal parts s1 and s2.s is called a halindrome if at least any one of the following conditions satisfy:
1.Sis a palindrome and length of S>=2
2.S1 is a halindrome.
3S2 a halindrome.
In the case of an odd length string the middle element is not present in both S1 and S2. If index of middle element is m. then, S1= S [0,m-1] and S2=S[m+1|S|-1].
Input Specification
input 1: Number of strings 1<=input1<=100.
imput2:An array of size input1 containing strings 2<=length of each string<=100.
output specification:
for each test case, return the number of strings which are halindromes.
EX:input1:1
input2:{harshk}
output 0
explanation:1.string S is not forming a palindrome.
2.string S1=har,which is not a halindrome.
3.String S2=shk,which is not a halindrome.
as none of the conditions are true,hence output to be returned is 0.
please give java coding solution for this question
Write a menu driven console application for Maintaining Train Details in Southern Railway using the concept of interfaces.
a. Create an interface called IOperations and declare necessary functions such as addTrain(), editTrain(), etc.
b. Create a class called Railways which implements this interface.
c. Create a Test class which contains the main function.
d. Include functionalities such as
i. Add Train
ii. Edit Train
iii. Display All Train Details
iv. Search Train by Name
v. Search Train by
i. Add Train
ii. Edit Train
iii. Display All Train Details
iv. Search Train by Name
v. Search Train by Source & Destination
vi. Search Train by Train Number
vii. Display all the Express Train
Write a program in java to take a number as input then display highest even factors the number has using method prototype: int highest(int n)
Write a program in java to take a number as input then display the highest digit and lowest digit present in it. Use method prototype: void check(int number). The program must use 3-digit and 4-digit numbers and 1-digit and 2-digit numbers are not to be accepted.
Array is
string productitems [] = {product A,….
double prices [] = {14.00,
How to use array to add product ?
and calculate the total price ?
and get total price in the array?
Zombie Apocalypse
A patient with first stage zombie virus has escaped from the facility in a city of population N. The zombie virus is very dangerous as it passer on to other people as they come in contact with the patient making them a patient as well.
Zombie virus has K life stages to develop, each of which takes 1 unit of time. Only the last stage is contagious. A person with zombie virus attacks only healthy people and can only affect one person in 1 unit of time.
if the patient escaped on Day 1. Find out the number of days it will take to wipe out the entire city's healthy population and turn them into a last stage zombie.
Note: 1 unit of time is equal to 1 day.
Input Specification.
Input1:Total healthy population of the city.
input2:Number of stages of zombie virus.
Output Specification
your function must return the numbers of days.
Example 1:
input1:10
input2:1
output:5
please give java code for this question.