Question2Final.java - ICT 104 Principles of Computer Science Assignment 1 Question 2 Jasdel Alaia S Delan CT024229 Purpose Write a java program test and

Question2Final.java - ICT 104 Principles of Computer...

This preview shows page 1 - 2 out of 4 pages.

/* * ICT 104 - Principles of Computer Science * Assignment 1 - Question 2 * Jasdel Alaia S. Delan - CT024229 * 21-02-2015 * * Purpose: Write a java program, test and document a program to gather some data for a show. * The program will ask the user their age (1-120), gender (male/female) or the person who called, if the person watches the show regularly * and if it wants to enter another person's detail. The program should output the total number of people who called, * number who said they watch the show regularly and percentage of who watch the show regularly and it must also print a table for those who watch the show * regularly according to gender and age categories * * Assumptions: Percentage in table are rounded to the nearest whole number. * The program should repeat until the user does not want to enter any more. * The user can enter small letters of capital letters without having error * */ package assignment1; import java.util.*; public class Question2Final { private char gender; private char show; //whether this person watched the show regularly or not private char choice = 'Y'; //whether this person wants to enter another detail private int age; //People's age public int counter; public int yes; private int maleunder; //Male under 30 private int maleover; //Male over 30 private int femaleunder; //Female under 30
Image of page 1
Image of page 2

You've reached the end of your free preview.

Want to read all 4 pages?

  • Winter '20
  • public int, Grammatical number, Grammatical conjugation, public void, private int, Jasdel Alaia S. Delan

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture