Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Java Expert


Home >> Java

Rule 1: Naming is an important issue in Java. Not only you need to define meaningful variable names, but also have to give appropriate names for the physical java file, which should be the same as your public class name that you edit.

Unless otherwise mentioned, you will follow the industry standard for Java naming convention:
(1) Java Classes start in uppercase and each individual word in the class name is capitalized;
(2) All Java methods and variables start in lowercase and each individual word in themethod and variable is capitalized;
(3) Each final variable (known as a constant) should be written in all uppercase.

Rule 2: There should be a space around all operators (e.g., 3 + 5, not 3+5). In addition, spacing with regards to parentheses should be consistent.

Rule 3: In addition to the Java naming convention, you are asked to add your name in front of each class name like LastNameFirstNameClassName.java.

For instance, if your name is "John Doe" and the class name is "RightTriangle", then your class name in your source code should be"DoeJohnRightTriangle" and your corresponding physical file name should be "DoeJohnRightTriangle.java".

Rule 4:Everything nested inside of an open brace should be indented with regular-sized spaces (say, 4 or 8 spaces).The open brace for functions and classes should (1) come at the end of the line and be preceded by a space like
public class DoeJohnRightTriangle {
public static void main() {
}
}

or (2)start with the new line as shown below:

public class DoeJohnRightTriangle
{
public static void main()
{
}
}

Rule 5: Always type block comments to include title of the project, program's purpose, your name, the date, and the version number as in the lectures or in the labs. For example,

/*******************************************************************
@Title: LastNameFirstNameClassName
@Purpose: To verify the edit, compile, execute function in Textpad
@Author: (your last & first name)
@Date: (today's date)
@Version: 1.0
********************************************************************/

Or

/**
@Title: LastNameFirstNameClassName
@Purpose: To verify the edit, compile, execute function in Textpad
@Author: (your last & first name)
@Date: (today's date)
@Version: 1.0
*/

Question 1: PersonalNameList

Companies acquire personal information from phone, World Wide Web, or email in order to sell or send an advertisement about their product. However, when this information is acquired, moved, copied or edited, the data may lose its quality. Often, the use of data administrators or a tool that has limited capabilities to correct the mistyped information can cause many problems. Moreover, most of the correction techniques are particularly implemented for the words used in daily conversations.

For this assignment question, write a program which will get the personal names from the user and store them in an array list called "personalNames". If there is any other character besides "a-z" or "A-Z" in a record, those should be flagged as ill-defined data. Because of the stated reasons above, instead of trying to fix the error in personal names, we want to remove this ill-defined data from the original array list and move it to another array list called "errorProneNames". In other words, error involving records should be saved in a separate array. At the end your solution should print out the "personalNames" and "errorProneNames" array list separately.

Your file will have the following documentation comments before the class header:

/**
@Title: LastNameFirstPersonalNameList
@Purpose: To practice ArrayList
@Author: (your last first name)
@Date: (today's date)
@Version: 1.0
*/

Question 2: Snowfall Total

The table below reflects the snowfall totals in centimeters for 5 different cities between the months of November and March.

 

November

December

January

February

March

Detroit

3.6

24.6

31.8

26.4

17.5

Chicago

4.7

29.1

33.0

29.2

17.7

Boston

5.5

23.3

41.0

26.7

14.4

New York

4.4

18.8

36.1

24.4

11.1

Washington DC.

2.1

10.1

18.8

18.8

8.9

Create a two dimensional array called snowfalltotal that will hold the values above.

a) Calculate and print: the average snowfall totals for each city.
b) Calculate and print: the average snowfall totals of these five cities for each month.
c) Calculate and print: In December, which city received the least amount of snowfall.
d) Calculate and print: Which city received the most amount of snowfall between the months of November and March.
e) Calculate and print: Which month has the most amount of snowfall of these five cities.

Your file will have the following documentation comments before the class header:

/**
@Title: LastNameFirstSnowFallTotal
@Purpose: To practice two dimensional arrays
@Author: (your last first name)
@Date: (today's date)
@Version: 1.0
*/

Java, Programming

  • Category:- Java
  • Reference No.:- M92053885
  • Price:- $55

Guranteed 36 Hours Delivery, In Price:- $55

Have any Question?


Related Questions in Java

Project requirementsfor the problem described in the next

Project requirements For the problem described in the next section, you must do the following: 1. include your student ID at the end of all filenames for all java code files. Three classes have been identified in section ...

Chatbotscreate a small networked chat application that is

Chatbots Create a small, networked chat application that is populated by bots. Introduction On an old server park, filled with applications from the early days of the internet, a few servers still run one of the earliest ...

Assignment taskwrite a java console application that allows

Assignment task Write a java console application that allows the user to read, validate, store, display, sort and search data such as flight departure city (String), flight number (integer), flight distance (integer), fl ...

Assignment - method in our madnessthe emphasis for this

Assignment - "Method in our Madness" The emphasis for this assignment is methods with parameters. In preparation for this assignment, create a folder called Assign_3 for the DrJava projects for the assignment. A Cityscap ...

Fundamentals of operating systems and java

Fundamentals of Operating Systems and Java Programming Purpose of the assessment (with ULO Mapping) This assignment assesses the following Unit Learning Outcomes; students should be able to demonstrate their achievements ...

Project descriptionwrite a java program to traverse a

Project Description: Write a java program to traverse a directory structure (DirWalker.java) of csv files that contain csv files with customer info. A simple sample in provided in with the sample code but you MUST will r ...

Overviewyou are required to use java se 80 and javafx to

Overview You are required to use Java SE 8.0 and JavaFX to develop a Graphical User Interface (GUI) for the FlexiRent rental property management program created in Assignment 1. This assignment is designed to help you: 1 ...

Retail price calculatorwrite a java program that asks the

Retail Price Calculator Write a JAVA program that asks the user to enter an item's wholesale cost and its markup percentage. It should then display the item's retail price. For example: (If an item's wholesale cost is 5. ...

Simple order processing systemquestion given the classes

Simple Order Processing System Question: Given the classes Ship (with getter and setter), Speedboat, and SpeedboatTest. Answer the following questions: Refine the whole application (all classes) and create Abstract class ...

Assessment database and multithread programmingtasktask 1

Assessment: Database and Multithread Programming Task Task 1: Grade Processing University grading system maintains a database called "GradeProcessing" that contains number of tables to store, retrieve and manipulate stud ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As