Question
Book Icon
Chapter 30, Problem 30.17PE
Program Plan Intro

Count consonants and vowels

Program Plan:

  • Import the necessary packages into program.
  • Define the class named “Exercise30_17”.
    • Define the main method.
      • Using “if…else” condition, check the first argument. If the file name is incorrect then print appropriate error message.
      • Exit the system.
    • Assign the first argument value into variable “name_file”.
      • Assign the vowel set into variable using “HashSet<>” class.
      • Find the number of vowels and consonants using “Stream” class.
    • Define the method “toCharacterArray()” which takes array list as parameter.
      • Declare the character variable “ans” in type of character.
      • Using “for” loop, assign all list values into “ans[]”.
      • Return the value of “ans”.

Blurred answer
Students have asked these similar questions
1. Complete the routing table for R2 as per the table shown below when implementing RIP routing Protocol? (14 marks) 195.2.4.0 130.10.0.0 195.2.4.1 m1 130.10.0.2 mo R2 R3 130.10.0.1 195.2.5.1 195.2.5.0 195.2.5.2 195.2.6.1 195.2.6.0 m2 130.11.0.0 130.11.0.2 205.5.5.0 205.5.5.1 R4 130.11.0.1 205.5.6.1 205.5.6.0
Analyze the charts and introduce each charts by describing each. Identify the patterns in the given data. And determine how are the data points are related.   Refer to the raw data (table):
3A) Generate a hash table for the following values: 11, 9, 6, 28, 19, 46, 34, 14. Assume the table size is 9 and the primary hash function is h(k) = k % 9. i) Hash table using quadratic probing ii) Hash table with a secondary hash function of h2(k) = 7- (k%7) 3B) Demonstrate with a suitable example, any three possible ways to remove the keys and yet maintaining the properties of a B-Tree. 3C) Differentiate between Greedy and Dynamic Programming.

Chapter 30 Solutions

MyLab Programming with Pearson eText -- Access Card -- for Introduction to Java Programming and Data Structures, Comprehensive Version

Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Text book image
Systems Architecture
Computer Science
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Cengage Learning