University of Sharjah, College of Business Administration.
Added on - 13 Sep 2019
Showing pages 1 of 1
University of Sharjah, College of Business AdministrationDepartment of Management Information SystemsBusiness programming II (0303310)Assignment 2Due Date: 11th of December 2016Submit your assignment on the blackboard link, corresponding to yourSection:Please follow the following rules when sending the source code:1) The name of the file should be q#_myID_section.java (for e.g:q1_u000002046_51.java)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 thenumber of integer numbers to be read. The numbers to be read (input) represent the age of agroup of people. Declare an array age [maxSize] of size const int maxSize = 20 and then readthe ages into it. The program uses a loop to go through the N numbers and counts the numberof children (less than 7) and the young people (7 to 90) and old people (greater than 90). Theprogram prints in a format similar to given format in the input / output sample the age and thestatus 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 lettersonlyand encrypt it using Cesar cypher.Cesar cypher replaces each letter of the staring by theletter next to it in the third position. For example the letter A is replaced by the letter D, theletter E by the letter H, and the letter Y by the letter B. Use the ASCII value of each letterwith % 26.Sample input / output: