Monday 28 September 2020

Java programing assesment


 

Computer support (5726) Programming Utility Software 962-068 Section 05817 Assignment 2 Due date: September 15 2020 before 23:30 Submission: via Lea in Omnivox Late Submissions: Percentage will be subtracted depending of the late time Evaluation: 20% of the final grade General Guidelines When Writing Programs: - Include the following comments at the top of your source codes // -------------------------------------------------------- // 


Assignment 02 // Written by: (include your name and student id) // 962-068 Programming Utility Software Section 05831 // -------------------------------------------------------- - In a comment, give a general explanation of what your program does. - Include comments in your program describing the main steps in your program. - Display a welcome message. - Display clear prompts for users when you are expecting the user to enter data from the keyboard. - All output should be displayed with clear messages and in an easy to read format. - End your program with a closing message so that the user knows that the program has terminated. 


Guidelines for submitting the Assignment: - Create files Q1.java and Q2.java that contain the source code for Question 1 and 2 respectively - Create one A2.zip file, containing the source files (Q1.java and Q2.java) for your assignment - Submit A2.zip file in the Lea "Assignment 2" placeholder before 23h30m, September 15, 2020 Question 1 (10%) Write a Java program that asks the user how many males and females are registered in the class. Once that information is entered, your program should display the total number of students registered in the class and the percentage of male and female students, in both decimal and percentage notation. 


You can assume the user will enter valid integers. Here are sample outputs to illustrate the expected behavior of your program: Note: user input is highlighted in grey Bonus points: Two (2%) bonus points will be awarded for adding a loop for checking the correctness of the user input (only 0 and positive integers are allowed) Question 2 (10%) The date June 10, 1960, is special because when we write it in the following format 6/10/1960, the month times the day equals the last 2 digits of the year. Write a Java program that asks the user to enter a day, month (in numeric form) and a 4-digit year. The program should then determine whether the month times the day equals the last 2 digits of the year. If so, it should display the date in the form dd/mm/yyyy saying the date is magic, or not magic if it is not. You can assume the user enters a correct date. 


Here are sample outputs to illustrate the expected behavior of your program. Note: user input is highlighted in grey Bonus points: - One (1%) bonus point will be awarded for adding a loop for checking the correctness of the user input (only positive integers are allowed); - Another one (1%) bonus point will be awarded for adding a check that the user input for the Date is between 1 and 31 inclusive (0 < Date < 32); - Additional one (1%) bonus point will be awarded for adding a check that the user input for the Month is between 1 and 12 inclusive (0 < Month < 13)

UK assignment helper

Author & Editor

We are the best assignment writing service provider in the UK. We can say it with pride that we tend to perceive our client’s requirements better than any other company. We provide assignment writing service in 100+ subjects.

0 comments:

Post a Comment