How it influence it department''s ability to maintain

Assignment Help Computer Engineering
Reference no: EM1334443

Details: Coding style is a very important characteristic for those entering the technology field. Here are two sample Java programs that do exactly the same thing according to the user. Please identify the differences in the code samples and discuss the style of each sample. Make sure to address readability as a characteristic and how it would influence an IT department's ability to maintain custom software for a corporation.


import java.util.Scanner;
public class DB2_SampleA{
public static void main(String args[]){
Scanner input = new Scanner(;
int num1;
System.out.print("Enter first number: ");
num1 = input.nextInt();
int num2;
System.out.print("Enter second number: ");
num2 = input.nextInt();
if (num1>num2)
System.out.println("First number is bigger");
if (num1<num2)
System.out.println("Second number is bigger");
if (num1==num2)
System.out.println("Numbers are equal");


// DB2_SampleB
// This program will get two numbers from the user
// and determine which is bigger or whether they are equal

import java.util.Scanner; // Scanner class used for getting user input

public class DB2_SampleB
// The manin method that begins execution of Java application
public static void main(String args[])
// variable declarations
int num1; // first number to compare
int num2; //second number to compare

// create Scanner to capture input from console
Scanner input = new Scanner(;

// get user input, num1 and num2
System.out.print("Enter first number: ");
num1 = input.nextInt();
System.out.print("Enter second number: ");
num2 = input.nextInt();

// compare numbers and display results
if (num1 > num2)
System.out.println("First number is bigger");
if (num1 < num2)
System.out.println("Second number is bigger");
if (num1 == num2)
System.out.println("Numbers are equal");

Reference no: EM1334443


Write a Review


Computer Engineering Questions & Answers

  What business applications may find roles useful

What business applications may find roles useful.

  Program to experiment various sort algorithms

Develop a program which enables you to experiment along with the various sort algorithms. This program must allow you to easily plug-in the new sort algorithms and provide comparison between them.

  Define the main function that repeatedly calls the motion

A control system applies a force to an actuator proportional to the voltage of a signal coming into the control system. It is desired not to allow actuator to quiver back and forth in the presence of small corrections near zero-force point.

  Make java class that creates an array of integers

Write down a Java class that creates an array of integers, fills it with values, prints the unsorted values, sorts the values into ascending order, and finally prints the sorted values.

  Microsoft windows 2000 has domains alpha, beta, and omega

Microsoft Windows 2000  has domains ALPHA, BETA, and OMEGA

  Significant investigative approachesfor cyber crime cases

Research information related to how the computer forensics investigators in today’s world of the computer forensics investigations prepare for the execution of an actual investigation.

  Program showing duplicate values in an array

Write down a program in C in order to show the duplicate values in an array, Documentation and Naming Style Sheet should include: Description of what program does, Summary of the problem's specifications and assumptions.

  Creating different volume such as the striped, mirrored

What should you do in order to create a different volume kind such as the striped, mirrored, or Raid 5 volumes? Why utilize the Windows command line when we live within the GUI world?

  Build a simple airline ticket reservation program

modify a simple airline ticket reservation program in C++ that keeps track of individual passenger names, and their associated flight numbers, departure dates and times, and originating and destination cities.

  Read and follow the directions in creating an archive

How do the algorithm techniques of fragmentation affect the end result of sorting by larger amounts.

  Define the divide-and-average algorithm

The divide-and-average algorithm for approximating the square root of any positive number a is as follows: Take any initial approximation x that is positive, and then find out a new approximation by calculating the average of x and a/x, that is, (..

  Explain the osi reference model and tcp/ip protocol

Describe protocols at the different layers of the OSI model and explain their functionality.explain the Differentiate between a confirmed service and a nonconfirmed service with respect to service primitives.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd