Business Programming II Assignment 2

Verified

Added on  2019/09/13

|1
|326
|393
Homework Assignment
AI Summary
This is a homework assignment for Business Programming II (0303310) at the University of Sharjah's College of Business Administration. The assignment consists of two exercises. Exercise #1 involves reading an integer N representing the number of ages to be read, storing them in an array, and counting the number of children, young people, and old people based on age ranges. Exercise #2 focuses on implementing a Caesar cipher to encrypt a string of uppercase letters, shifting each letter three positions forward in the alphabet. The assignment requires students to submit their Java code following specific file naming conventions and warns against plagiarism.
Document Page
University of Sharjah, College of Business Administration
Department of Management Information Systems
Business programming II (0303310)
Assignment 2
Due 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 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 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 #2 Cesar Cypher: Write a program that reads a string of upper case letters
only and 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:
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
[object Object]