Instructions
Requirements and Specifications
- Provide a brief description for each of your selected methodologies.
- Include at least 3 characteristics of each methodology
- Discuss the advantages and disadvantages of each methodology
- Cite all references using APA formatting.
- Create a table to summarize your findings, as follows:
Methodology | Characteristics | Advantages | Disadvantages |
Methodology 1 | |||
Methodology 2 | |||
Methodology 3 |
2.Using the library, Internet, and your course materials, research information about software development methodologies. Select a development methodology and a development scenario that the methodology would work well for. Write 400–600 words to address the following:
- Summarize the scenario you would be dealing with as a software development example.
- Describe the development methodology you selected, and justify why you think it fits well with the scenario.
- Identify the key strengths and weaknesses of the methodology.
- Discuss how you would deal with the potential problems that might arise from the weaknesses in the methodology.
- Cite all references using APA format.
Source Code
REPORT
Initially, Java language had name “Oak”. It was designed by James Gosling for programming household appliances. Since another language with such name had been already existed by that time, language was renamed to Java. The name was given after coffee brand “Java” (which consequently was named after Indonesian island Java). That’s why many of official logos of Java language contain cup with hot coffee. There is an alternative version for Java language name history. In this version, coffeemaker machine was the first gadget, language was used for.
The first gadget, which was implemented using new Java language, was Star7. It was a pocket PC, which was rather modern for its time, but due its high price (50 dollars), it was not so popular among customer and users.
However, in comparison to Star7 gadget, Java programming language and its environment eventually become very popular. The next huge project, the language was used for, was the interactive television project. But this product also had not reach success.
From middle 90’s Java language has been used for creating client applications and server software. At the same time, so-called Java-applets were widely used. Java-applet is small graphic application for web pages. But nowadays, this technology is used rarely.
The main innovation and feature of Java language is so-called bytecode. All code which is written in Java language is translated to bytecode, which later is executed with Java Virtual Machine (JVM). Java Virtual Machine is a special program, which processes bytecode and passes instructions to interpreter. This concept defines the common advantages and disadvantages of Java:
The main advantage is that execution of bytecode is independent of operation system and hardware (since bytecode is processed only by JVM). This allows to run Java programs in any environment, which has appropriate implementation of Java Virtual Machine.
Another advantage is security concept, generated by such approach. All control is taken by Java Virtual Machine and execution does NOT “go out” of this machine. Any operations that need additional abilities (illegal memory/data access, network connection, etc.) always cause exceptions and stop the Java program execution. JVM allows to configure security rather flexible and ensures no global system errors occur.
The most significant disadvantage of Java language is its performance. In comparison to C/C++, Java language takes 2-3 times more memory and longer time to make the same tasks. Many changes (Just-in-compilation, usage of native code, etc.) were made to Java language to fix this issue, but, unfortunately, performance gap between Java and, for example, C++ exists, and its size is rather significant.
AVERAGE
package average;
import java.util.Scanner;
public class Average {
public static void main(String[] args) {
// reading for integers into an array
int[] array = readIntegers(4);
// getting average value of the array
double average = calculateAverage(array);
// outputting average value
System.out.println("Average value is: " + average);
}
/**
* Private static method trying to calculate average value for given
* integer array.
* If array is empty, 0 is returned.
* @param array to calculate average value for
* @return average value for non-empty array, 0 --- for empty
*/
private static double calculateAverage(int[] array) {
// initializing result value
double result = 0.0;
// getting length of array
int count = array.length;
// if length is 0, returning 0
if (count == 0) {
return result;
}
// iterating overa array values to accumulate their sum
for (int a : array) {
result += a;
}
// dividing total sum by number of elements
return result / count;
}
/**
* Private static method trying to scan given number of integers
* from console.
* @param n number of integers to scan
* @return array of scanned integers with length n
*/
private static int[] readIntegers(int n) {
// creating scanner to scan console
try (Scanner scanner = new Scanner(System.in)) {
// creating array to store scanned integers
int[] array = new int[n];
// reading n integers
for (int i = 0; i < n; i++) {
// reading single integer with auxiliary method
array[i] = readInteger(scanner, i + 1);
}
// returning result
return array;
}
}
/**
* Private static method trying to scan integer.
* If input is incorrect, error message is shown, and method scans
* next line.
* @param scanner to scan input with
* @param count current number of integer to scan
* @return scanned integer
*/
private static int readInteger(Scanner scanner, int count) {
// iterating infinitely until integer is read correctly
while (true) {
try {
// prompting message to the console
System.out.print("Please, enter " + count + "'th integer: ");
// scanning line and parsing integer
return Integer.parseInt(scanner.nextLine().trim());
} catch (NumberFormatException e) {
// showing error message
System.out.println("Your input is invalid. Please, try again.");
}
}
}
}