0% found this document useful (0 votes)
116 views

Java Lab Task

This document contains programming tasks and hints for a Programming Fundamentals II class. It includes tasks to print the English alphabet up to a certain letter, read and analyze a string, count characters in a string, sort strings alphabetically, and determine if characters are vowels or consonants. The tasks are intended to help students practice basic Java programming concepts like loops, conditionals, methods, and data types.

Uploaded by

Mohammed Qader
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
116 views

Java Lab Task

This document contains programming tasks and hints for a Programming Fundamentals II class. It includes tasks to print the English alphabet up to a certain letter, read and analyze a string, count characters in a string, sort strings alphabetically, and determine if characters are vowels or consonants. The tasks are intended to help students practice basic Java programming concepts like loops, conditionals, methods, and data types.

Uploaded by

Mohammed Qader
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 9

Sulaimani polytechnic university

College of informatics
Information Technology Department

Programming Fundamental II

2nd semester: Week 1

Renas Wrya (MSc.)


1
[email protected]
1
Task1 :
Write a Java program that print all English alphabet letters from A to Z
terminate the loop when it reaches the letter ‘T’

Hint
• use char data
type instead of
int.
• Use if
statement to
determine
letter T
• Use break
statement to
terminate the
loop

2
Task 2 : write a java program to read any String then print :
A. The number of characters
B. String letters in upper case
C. Fifth letter in uppercase of the string
D. check weather the word contain the letter b

3
Task3 : write a program to count the total number of character [e] in any String that entered by the
user

4
Task 3-2 :write a program to count the total number of any character in any String that entered by
the user

5
Task4 : Write a program that reads a string and prints each character of the word on a separate line in
opposite order

6
Task5 : write a program that reads in three strings [names] and sorts them as alphabetical order

7
Task 6-1 : Write a java program that ask the user to enter a letter and check whether the
letter is a vowel or consonant , then display its Unicode
Primitive datatype casting

8
Task 6 : repeat task (6-1) to determine a vowel or consonant for 7 character

You might also like