Ask a question to Desklib · AI bot


University of Sharjah, College of Business Administration.

Added on -2019-09-13

| 1 pages
| 326 words

Trusted by 2+ million users,
1000+ happy students everyday

University of Sharjah, College of Business AdministrationDepartment of Management Information SystemsBusiness programming II (0303310)Assignment 2Due Date: 11th of December 2016 Submit your assignment on the blackboard link, corresponding to your Section: Please follow the following rules when sending the source code: 1) The name of the file should be (for e.g: 2) In case two assignments are found to be similar, both students will get ZERO.’ Exercise #1 Age:Write a java program that reads an integer, say N, which represents the number of integer numbers to be read. The numbers to be read (input) represent the age of a group of people. Declare an array age [maxSize] of size const int maxSize = 20 and then read the ages into it. The program uses a loop to go through the N numbers and counts the number of children (less than 7) and the young people (7 to 90) and old people (greater than 90). The program prints in a format similar to given format in the input / output sample the age and the status of each person, and the number of children, young, and old persons.Sample input / output:Exercise #2Cesar Cypher:Write a program that readsa stringof upper case letters onlyand encrypt it using Cesar cypher.Cesar cypher replaces each letter of the staring by the letter next to it in the third position. For example the letter A is replaced by the letter D, the letter E by the letter H, and the letter Y by the letter B. Use the ASCII value of each letter with % 26.Sample input / output:

Found this document preview useful?

You are reading a preview
Upload your documents to download
Become a Desklib member to get accesss

Students who viewed this