Sale!

COMP 231 Assignment 1 solved

Original price was: $35.00.Current price is: $30.00. $25.50

Category:

Description

5/5 - (7 votes)

Objectives:
1. To understand basic problem solving techniques using Java Programming Language.
2. To declare Java primitive data types. In addition,to obtain input and display output.
3. To be able to use arithmetic and use different control structures.
4. To create methods, invoke methods, and pass arguments to a method
Nice Number Programming:
Nice program ask user to enter three integers from keyboard (java console), the three integers
represent left bound, right bound and arbitrary digit ‘m’, where left bound is less than right bound.
Program should print all nice numbers in the given range that doesn’t contain digit ‘m’. The number is
nice if its every digit is larger than the sum of digits which are on the right side of that digit. For example
741 is a nice number since 4> 1, and 7> 4+1. with digit m=2
Write a complete program in Java that Call only One method (niceNumbers method) that will print all nice
numbers excluding a given digit ‘m’ that also entered by user ?
Input Sample :
Enter Left bound: 740
Enter Right bound:850
Enter digit to exclude it:2
Output sample:
Nice Numbers in Range Left=740, Right=850 with exclude digit m= 2 are:
740 741 750 751 760 810 830 831 840 841 843 850
Your method prototype is like this:
public static void niceNumbers(int left, int right, int dight) {
….
}
2
Set of instructions:
1.Create folder at your desktop with your Assignment#, ID, and your name
Example: A2_1190100_Ali Mohammad
2. Create a new project using Eclipse IDE and store your project inside this folder.
3.Zipped this folder and submit it by your ITC account [under meta course ].
Grading policy and general notes on the Assignment:
1. Your application should have all functionalities working properly. Twenty percent of marks will be
graded for the functionality of the assignment.
2. The following notes will make up the remaining 10 marks of the grade:
a. There has to be adequate documentation and comments in the code(i.e., functions, loops, etc.);
b. Your code should follow the code convention (i.e., spaces, indentations,etc.); and
3. Any plagiarized code will not be marked.
4. ANY LATE Assignment will never be accepted for any excuse.
Types of cheating:
Types of cheating:
1. Getting codes form outsource, like books, internet.
2. Cheating from any classmate.
3. Trying to get answers from any website.
4. Trying to get answers from the Facebook groups or from any social media.
5. Trying to get answer from Chegg website.