Create a new java project

Assignment Help Software Engineering
Reference no: EM131239745

Java Output and Method Calls

Learning Objectives:

- Create a new Java project
- Execute (run) a working Java program
- Define and identify Java comments, strings and methods
- Invoke a Java method and pass parameters to a method
- Produce output from a Java program
# Exercise

1 Create a new folder named \YourName\CP1810

2 Launch NetBeans and create a new Java project as an Application in the above folder a. Launch NetBeans
b. Select Java Application
c. Set Project Name to Lab01_Output
d. Set Project Location to the folder \YourName\CP1810\Lab

NOTE Java ignorescomments. There are two types of comments:
- One-line comments begin with a // and continue to the end of the line
- Multi-line comments begin with a /* and end with a */

3 Run the program.
The program should compile and run cleanly with no errors.
But, there is no output
NOTE A String is any text starting and ending with double quotes

4 Modify the initial program as follows (Replace firstnamelastname with your name):
public static void main( String[] args ) { put( "Hello firstnamelastname" );
} public static void put( String text ) {
System.out.print( text );
}
Run the program
NOTE Methods, such as main() and put(), are basic units of execution in Java
- A method can call or invoke another method
- All Java programs begin execution in the method main()

5 Modify main() and run the program with the following change:
public static void main( String[] args ) { put( "Hello firstnamelastname" ); put( "\n" );
}
NOTE Maintain a working program by always running a program after any change. This way at all times, you are one change away from a working program.

6 Modify main() and run the program with the following change:
public static void main( String[] args ) {
1 put( "Hello firstnamelastname" );
2 put( "\n" );
3 put( "How are you?\n" ); }

7 Here is a program trace of the above:

8 Modify main() to print out:
Hello
Firstname
Lastname
How are you?

9 Modify main() to also print:
*
**
***

10 Modify main() to also print:
*
**
***

11 Modify main() to also print:
*
***
*****

12 Create a new Java project named Lab01_Namethat prints a business card with your name bordered by vertical and horizontal stars.
**********************
* firstnamelastname *
**********************

Reference no: EM131239745

Information security issues that organisations face

Create an initial post in which you take a position on the resources, methods and approaches that can help make firms more secure. In your post, summarise the top 3-5 major

Define metrics that will be collected to track effectiveness

Define the metrics that will be collected to track the effectiveness of software assurance in the company. Include a description of how each of the metrics will be obtained an

Supplier of office equipment for business

OES LTD is a manufacturer and supplier of office equipment for business. Originally, a family owned business, is now employing over 100 employees with three owners: Joan Smi

How applying a mixed-source methodology enhances testing

Elabote on how applying a mixed-source methodology overcomes the disadvantages of a single-source methodology. Elaborate on how applying a mixed-source methodology enhan

Resources for riordan manufacturing and service request

Complete Section 3 of the Service Request SR-rm-022 paper for Riordan Manufacturing. This section incorporates the transition from design to implementation. Resource: Virtua

What are advantages or disadvantages to having such policy

In answering this question we first need to consider does a company need a policy for determining which methodology/model to use? What are the advantages/disadvantages to ha

Brainstorming and delphi technique for risk identification

Discuss the difference between using brainstorming and the Delphi Technique for risk identification and determine some of the advantages and disadvantages of each approach?

Identify the project-what is it supposed to do

Create an entire SDLC process that will bring added value to a business. Identify the project-what is it supposed to do? Determine the methodology to be used; describe, in det

Reviews

Write a Review

 
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