Welcome to the Simplilearn Community

Want to join the rest of our members? Sign up right away!

Sign Up

Phase-1: Implement OOPS using JAVA with Data Structures and Beyond | Trainer - Manali Dubal | Oct Cohort | Oct 9,10,16,17,23,24,30,31, Nov 6

Deepanshu_15

Moderator
Staff member
Simplilearn Support
Hi All,

You can interact here regarding any course-related queries.


Thanks & Regards
Team Simplilearn
 

Deepanshu_15

Moderator
Staff member
Simplilearn Support
Hi All,

I would request all of you to go through the OSL content before joining for the upcoming sessions too as it is really important to understand LVC sessions' concepts. Going through them and attending all the LVC sessions throughout will reduce the number of general queries that you might have.
 

Renuka_18

Member
Hello Sir,
As this is my second time changing the batch, kindly teach the basics, many concepts are missing in the Circullum. As a non programmer, it's really finding hard to follow. While taking course, u ppl wil mention anyone can take it, everything wil be taught from scratch, am sorry to say, it's not happening. Paying so much, asking us to refer self learning videos, it's not good. Have bit concern. Java s huge, can't learn in 6months, tat too master program. Fedup of listening self learning videos. Kindly find some alternative way. Paying emi every month, not getting back in anything. Money is really concerned fr us.
 
I am not getting output as mention in below

In the main method, read a String (which may have alphabets along with numeric digits) and print the number of vowel and consonants (any alphabet apart from vowel is a consonant) present in the given String.
Note: The output should be printed in the same format as mentioned in the sample output.

Consider below sample input and output:

Input:
Welcome123

Output:
Number of Vowels: 3
Number of Consonants: 4
 

Attachments

  • javaex.PNG
    javaex.PNG
    88 KB · Views: 8
Hi All,

I would request all of you to go through the OSL content before joining for the upcoming sessions too as it is really important to understand LVC sessions' concepts. Going through them and attending all the LVC sessions throughout will reduce the number of general queries that you might have.
osl are outdated we want our doubt solution within in 30 min or 45 min max you guuys took 2 days to replay this is not amzon or any other ecommerc platform this is a learning platform where ppl comes to learn not for rise tickets
 

Alexander_54

New Member
I am not getting output as mention in below

In the main method, read a String (which may have alphabets along with numeric digits) and print the number of vowel and consonants (any alphabet apart from vowel is a consonant) present in the given String.
Note: The output should be printed in the same format as mentioned in the sample output.

Consider below sample input and output:

Input:
Welcome123

Output:
Number of Vowels: 3
Number of Consonants: 4
So, in this logic y must implement method boolean isConsonunt(char ch). Do it method the same like isVovel, but use Q W R T P S D F G HH K L Z X C V B N M. Because u can use in string not only characters .... it was be numbers or @##$$$%^%^&

Also u can use this approach:

String vovels="euoai";
String cons="qwrtypsdfghjklzxcvbnm";

//For instance my char = s

String myChar="s";

if (vovels.indexOf(myChar)>=0) {
//so, it vovels
}
else if (cons.indexOf(myChar)>=0)
{
//so, it cons
}


And some things wich suggest Amit:

String source="example StrING";
String sourceToLower=source.toLowerCase(Locale.ROOT);

char[] sourceArr=sourceToLower.toCharArray();

for (char c : sourceArr) {

//do some operation for variable c
//first c='e';
//secound c='x';
//etc

}
 
I am not getting output as mention in below

In the main method, read a String (which may have alphabets along with numeric digits) and print the number of vowel and consonants (any alphabet apart from vowel is a consonant) present in the given String.
Note: The output should be printed in the same format as mentioned in the sample output.

Consider below sample input and output:

Input:
Welcome123

Output:
Number of Vowels: 3
Number of Consonants: 4
Hello learner,
One small issue with this code is: you're checking for vowels using isVowels() function, but about numbers or spaces or any special character which is not a vowel or a consonant.
So, there are a few more functions like isDigit() which can help you check for whether the character is a digit or not. Please take the help of such functions and your logic will work just fine.
 

Support Simplilearn(4685)

Moderator
Staff member
Alumni
Hello Sir,
As this is my second time changing the batch, kindly teach the basics, many concepts are missing in the Circullum. As a non programmer, it's really finding hard to follow. While taking course, u ppl wil mention anyone can take it, everything wil be taught from scratch, am sorry to say, it's not happening. Paying so much, asking us to refer self learning videos, it's not good. Have bit concern. Java s huge, can't learn in 6months, tat too master program. Fedup of listening self learning videos. Kindly find some alternative way. Paying emi every month, not getting back in anything. Money is really concerned fr us.
Hello Renuka,

I will suggest you practise the lab activities on your weekdays as much as possible. You can let us know if your code is not getting compiled with a small description of tasks.
 
Top