Blog
The first program developed was only able to execute a command to calculate odd numbers
Name
Tutor
Course
Date
Part A
The problem to be solved
The first program developed was only able to execute a command to calculate odd numbers. The initial C# programming program was not able to get even numbers yet this section was highly needed. For this reason, I had to come up with a way to handle this problem in the best way possible. Not only will the above problem be solved based on the dimension, but also a way to get reliable way of analysing extensive information based on odd and even numbers. The program is able to solve add and even numbers even to triple digits.
The programming technique Applied
Since the first program was developed, using C# is had to change the codes to Java programming language so that it could be meet the current or the contemporary needs and demands. Therefore, I programmed the codes using Java Language to get better results. All the variables used were in line with Industrial Java codes. Most of the expressions and code initials used were commonly used
Example of the Code Used
/*
Even Odd Number Example
This Java Even Odd Number Example shows how to check if the given
number is even or odd.
*/
public class FindEvenOrOddNumber {
public static void main(String[] args) {
//create an array of 10 numbers
int[] numbers = new int[]{1,2,3,4,5,6,7,8,9,10};
for(int i=0; i < numbers.length; i++){
/*
* use modulus operator to check if the number is even or odd.
* If we divide any number by 2 and reminder is 0 then the number is
* even, otherwise it is odd.
*/
if(numbers[i]%2 == 0)
System.out.println(numbers[i] + ” is even number.”);
else
System.out.println(numbers[i] + ” is odd number.”);
}
}
}
/*
Output of the program would be
1 is odd number.
2 is even number.
3 is odd number.
4 is even number.
5 is odd number.
6 is even number.
7 is odd number.
8 is even number.
9 is odd number.
10 is even number.
*/
The code above offered a unique and a simple way of getting odd and even numbers in the easiest way possible. The program was designed to meet the needs of school going children. Industrially, the code will be used to make sample calculators for easy usage.
Lesson Learned
I noted that the experience obtained after making this first simple Java programming program was that the world of programing is a simple one and that it entails finding loopholes or gaps in programs and to develop outstanding programs that will meet the needs of the people. I also learned that there are gaps in current programs that can be bridged using programming platform. Being able to adopt such codes and coming up with such a program is composed of various analytical skills and concepts. The most vital lesson gained from the developed or creation of the above program is that one can be able to analyse and integrate basic skills to come up with a modern program. I also noted that the development of such programs is a way to develop thinking skills. I conclude that the development of computer programs is not all about coming up with a code, but it improves one abstract skill among other knowledge.
Part 2
The Problem
The computing problem to be noted in this cases it to find the area of a figure or an image given the dimensions. Therefore, the program if feed with the dimensions are to get accurate and fast output. Most teachers and tutor in high schools and colleges are faced with such problems hence the program will be able to generate marking schemes with easy and to avoid marking delays. In addition, students are also able to mark for themselves their assignments. The problem was to integrate basic mathematical concepts with the aim of coming up with an ideal computational results.
Method used
Since the program is, a simple numeric program hence used basic mathematics manipulation techniques. The program was to get and area of an image given the dimensions hence easy to define the codes. Despite the fact that the problem was to solve a computational problem, I had to employ programming skills so that the problem must have a long-term solution. This helps solve the problem at once.
Sample Codes Used
01 import java.util.Scanner;
02
03 public class Circle
04 {
05 public static void main(String[] args)
06 {
07 Scanner circle = new Scanner (System.in);
08 int radius;
09 float pi =(float) 3.14159265;
10 float diameter;
11 float circumference;
12 float area;
13
14 System.out.print(“Enter the radius,please:”);
15
16 radius = circle.nextInt();
17
18 diameter=radius*2;
19 circumference=diameter*pi;
20 area=pi*(radius*radius);
21
22 System.out.printf( “diameter is %fn”,diameter);
23 System.out.printf( “circumference is %fn”,circumference);
24 System.out.printf( “area is %fn”,area);
25
26
27 }
28
29
30 }
Explanation of the Solution
The above codes offer the teacher an automatics way to get the results done with ease and to find answers to the problems. Once a dimensions are given the programs gives the answer.
Lesson
Working with codes simply means improving critical and abstract improvement of skills. Thus, the above program was able to improve this skill. Thus, I noted that development of such programs is important in critical skills and analysis of concepts. In addition, coming up with such programs via computational concepts is a unique way that opens up ones analysis skills. The composing and integrating basic mathematical concepts among other useful tactics and coming up with such a program has much to be accounted for. This helped me to improve my analysis skills as well as not the most significant aspects of computer concepts. I was able to understand how basic numerical skills could be used in programming.
