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.

1. SAMPLE CODE A:

import java.util.Scanner;
public class DB2_SampleA{
public static void main(String args[]){
Scanner input = new Scanner(System.in);
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");
}}

2. SAMPLE CODE B:

// 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(System.in);

// 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

Questions Cloud

Analysis on wal-mart : Wal-Mart is the largest corporation in the world, and it has obviously enjoyed tremendous success. But while many welcome its location in their communities, others do not.
Create and implement the class myarray : Please assist with following problem. I am totally lost with this so if you can also include statements telling me what you did, I would appreciate it. The entire chapter talks about array index out of bounds which has completely confused me and t..
Prepare an innovative environment in daycare or teaching : What innovation would like to implement and What type of innovation would this be
Illustrate why do economists pay more attention to national : Illustrate why do economists pay more attention to national economies than state or regional economies.
How it influence it department''s ability to maintain : be sure to address readability as a characteristic and how it will influence an IT department's ability to maintain custom software for a corporation.
Prepare a file of remedies and responsibilities : What is the city's responsibility in addressing this situation and What remedies can the courts provide and prepare a file of remedies and responsibilities.
World bank is presently advising newly industrialized nation : The World Bank is presently advising newly industrialized nations on how to encourage growth and they have asked for your help.
Using information from the almanac of american politics : Using information from the Almanac of American Politics or other respectable sources, prepare a memorandum that demonstrates,  Your knowledge of Senator Harry Reid.
Describe how the establishment of free trade : Business analysis questions: free trade, business forms - In your own words describe the purpose for developing free trade agreements and describe how the establishment of free trade areas represents both a threat and an opportunity for global corp..

Reviews

Write a Review

Computer Engineering Questions & Answers

  What are outputs and inputs to schedule control

What are the SMART criteria? What are the 5key points of using project milestones.

  How to use ms access and create a database

How to use MS Access and create a database

  Write and assemble the programs

Write down and assemble the following programs and include the start and end addresses for all memory addresses. Show results in following format.

  What are the required devices to establish network

What kind of problems may we encounter while establishing this network. What are the required devices to establish network? Provide brief explanation with data flow diagrams.

  Make the price of an item for each of the five days

The Last Stop Boutique is having a five-day sale. Each day, starting on Monday, price will drop 10% of the previous day's price. For example, if the original price of a product is $20.00, the sale price on Monday would be $18.00 (10% less than the..

  Program to persons ability to vote

Write down a program which asks for the user's age. On the basis of their response print "You may vote" (18 years old or older) or "You can't vote"

  Make use of method iteration to find a formula expressing

How several elementary operations are used in the following algorithm? The elementary operations are comparison operations (such as > and

  Drawing the uml state diagram

In the chess game white and black make alternate moves. White takes first move. Both Black and White may finish the game: by winning, by giving up, by draw.

  What is the output of code fragment that invokes calc

What is output of code fragment that invokes calc

  What types on a lan and the type of software licensing

Discuss role of each of the following server types on a LAN and the type of software licensing with which the software should be purchased.

  Benefit and drawback of each major operating system

Benefit and drawback of each major operating system

  Define why it is suggested that for security reasons

Since many commercial APs have the SSID broadcast option enabled by default, so clients may easily detect the presence of an AP. APs are also configured as DHCPs and Firewalls.

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