This repository contains Past Questions on Accra Technical University's Java Exam Questions 2019-2022 Year Group
Question One
- Create package com.QoneID; //where ID = your index number.
- public class ArrayID() should contain public static void main (String [] agrs){}
- Write Java codes ti accept 10 numbers an Array and display the following a. The Sum b. The Average c. Numbers in the Reverse Order
SAMPLE OUTPUT Enter the 10 Numbers: 0 1 2 3 4 5 6 7 8 9 Sum = 45 Average = 4.5 Reverse Order [ 9 8 7 6 5 4 3 2 1 0 ] Process finished with exit code 0
Question two
- Create the application shown here and modify it per the instructions below; package com.QThreeID // where ID = your index number enum IteCat { WOMEN, MEN, GIRLS, BOYS, BABIES } public class StoreItem{ long itemNumber; String ItemName; boolean isClothingItem; double unitPrice;
void createItem(){ this.itemNummber = 101112; this.category = IteCat.WOMEN; this.itemName = "Skirt and Top"; this.isClothingItem = true; this.unitPrice = 200.00; }
void display{ System.ot.println("Department Store"); System.ot.println("**********************"); System.ot.println("Stock #: "); System.ot.println("Clothing Item: ); System.ot.println("Department Store");