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

Questions Cloud

What are the implications for networks of the future : As WLANs become more powerful, what are the implications for networks of the future?  - Will wired LANS still be common or will we eliminate wired offices?
What does the cable plan look like : Document one LAN in detail. - What devices are attached, what cabling is used, and what is the topology? What does the cable plan look like?
Describe elements associated with the police recruitment : Describe elements associated with the police recruitment and selection process at the agency. Identify major components of the training process and the career development programs for officers who work at the agency.
Does this explain any earlier observations you made : Suppose you want the maximum number of hyper beet pieces to result from making n cuts. What properties should your sets of cuts have in order to obtain the maximum number of hyper beet pieces?
Create a new java project : Create a new Java project, Execute (run) a working Java program and Define and identify Java comments, strings and methods - Maintain a working program by always running a program after any change. This way at all times, you are one change away from..
New guineans more skilled than typical westerners : In what ways are the New Guineans more skilled than typical Westerners? In what ways have they been at a disadvantage?
Develop a simple lan and determine the total cost : Develop a simple LAN and determine the total cost; that is, select the cables, hubs/switches, and NICs and price them.
What are the next terms in this sequence : Start conjecturing if you haven't already. What are the next terms in this sequence? Do you see a recurrence relation? How about a closed-form formula? Share your conjectures with others.
Analyze the federal court decisions in regards : From the second e-Activity, analyze the Federal court decisions in regards to the Affordable Health Care Act. Debate the extent to which the Supreme Court's decisions have affected healthcare policy in your community. Provide two (2) specific exam..

Reviews

Write a Review

Software Engineering Questions & Answers

  Key strengths and weaknesses of the methodology

Describe the development methodology you selected and why you think it fits well with the scenario. Identify the key strengths and weaknesses of the methodology

  Find the quotients and remainders

Using CRC polynomial 1101 compute the CRC code word for the information word 01001101. Check the Division performed at the receiver.

  How will new servers be deployed

You have been hired by Shiv LLC as an Information Technology consultant to develop a technology proposal. Shiv LLC manufactures and distributes solar panel for the consumer market. Your job is to submit a proposal that meets their criteria.

  Security characteristics such as confidentiality

1. assume that a security model is needed for protection of information in your class. using the nstissc model examine

  Naming conventions in programming language

Discuss and explain why naming conventions are important and why programmers should consistently follow them. Include in this discussion problems that could arise in naming variables if one convention is not followed.

  One of the most difficult aspects of planning software

one of the most difficult aspects of planning software development is estimating the effort. often times we are asked

  Develop a plan for system and system testing

Develop a plan for system testing. Include areas that you will test within both the application and a system as a whole and how errors will be tracked and reported.

  Critical success factors for retail e business startups

Question 1: Most businesses should engage in e-commerce on the Internet. Do you agree or disagree with this statement? Explain your position. Question 2: What are the critical success factors for retail e-Business startups?

  Add the numbers 3 through 10 to the hashtable

We are working on hashtables and I am trying to figure out a real life example that could be solved with hashtables to jtree as well as some type of array or jlist. I just need some opinions or examples of this part please.

  Give three network addresses

Subnet 2 is to support up to 95 interfaces, and Subnet 3 is to support up to 16 interfaces. Give three network addresses (of the form a.b.c .dJx) which fulfill these constraints.

  Consider the type of software process used in your

consider the type of software process used in your organization or one in which you have previously worked. how many of

  Explain why design conflicts might arise

Question 1: Explain why design conflicts might arise when designing an architecture for which both availability and security requirements are the most important non-functional requirements.

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