Getting Help with Java Programming
Getting Help with Java Programming
Most Java™ programmers, whether new to programming or experienced professionals, take advantage of high-quality
online sites that offer Java™ tutorials, reference materials, and programming communities.
High-quality sites such as Oracle®’s The Java™ Tutorials can save you time and effort by providing information such
as example code, tips for working with a specific Java™ development environment, and the latest Java™ libraries.
For this discussion, research and share at least one high-quality website that offers Java™ sample code, Java™ API
references, or Java™ programmer discussions. Apply the following CRAAP criteria when vetting sites:
Portable languages and Component Reusability
Java is a portable language, and being an object-oriented programming language, it also encourages component re-usability. How does Java achieve these two important features? How are these features desirable in modern software engineering?
Saving Account as a Class
You are a bank manager and you are helping a new bank teller understand the kind of accounts the bank offers. If a customer comes in asking to open a new savings account, the teller needs to ask what kind of account— passbook savings or certificate of deposit —the customer would like to open. Remind the customer that all accounts with our bank are insured by the FDIC. You should explain that all accounts earn some interest; a savings account’s interest is compounded monthly.
PRG420 Java Programming I
Week 2 Discussion
Variables in Real-Life Programs
Discuss what other industry examples of if/then/else logic you can think of. How might an organization’s environment affect a programmer’s choice of variable types?
ArrayList
What is the difference between arrays and ArrayList? What are the advantages and disadvantages of an ArrayList, and when should you use an ArrayList over a simple array?
StringBuilder
What is the difference between string and StringBuilder? What are the advantages and disadvantages of a StringBuilder, and when should you use a StringBuilder over a simple string?
PRG420 Java Programming I
Week 3 Discussion
Loop Syntax
Research and discuss the following:
• Is the following code syntactically correct? How did you determine your answer?
If the following code is not syntactically correct, what is missing? If it is syntactically correct, what is the expected result?
for ( ; ; ) {
System.out.println(“In the body of the loop”);
}Many programmers use variables named i, j, or k to increment a loop counter, as shown below. However, variables can be named anything a programmer wants to name them, as long as they follow Java™’s syntactical rules for variable names. What are the benefits and drawbacks of using variable names such as i to increment or decrement loop counters vs. other variable names, such as counter or myCounter or hour?
for (int i = 1; i <= 24; i++) { // using i as counter
if (i < 12) { // morning hours
System.out.println(i + ” a.m.”);
}else if (i == 12) { // noon is a special case
System.out.println(i + ” p.m.”);
}else // afternoon hours {
System.out.println(i-12 + ” p.m.”);
}}Supporting Activity: Loops
Our focus this week is loops.
Select and complete one of the following activities:
Convert the following program from for loop to while loop.
class Arithmetic Progression
{ public static void main (String [] args)
{ int sum = 0;
while (int I != -1)
{ sum = sum + i;
System.out.println(Integer.toString(sum));
} }}Supporting Activity: Conditions
Consider the following conditions
CONDITION 1: while ( !(cChoice == ‘Q’ || cChoice == ‘q’) )
CONDITION 2: while ( cChoice != ‘Q’ || cChoice != ‘q’ )
Do Conditions 1 and 2 give the same result? What tool or technique would you use to explain the result?
PRG420 Java Programming I
Week 4 Discussion
Arrays vs. Databases
Arrays in Java™ are used to hold data as are databases, also.
Research and discuss the differences between these two approaches. In what situations would it be appropriate to use an array to hold data, and in what situations would it be appropriate to use a database instead? Are there any scenarios in which it might be appropriate to use both a database and an array to process data in the same Java™ app?
Savings Account
You are a bank manager and you are helping a new bank teller understand the kind of accounts the bank offers. If a customer comes in asking to open a new savings account, the teller needs to ask what kind of account–passbook savings or certificate of deposit–the customer would like to open. Remind the customer that all accounts with our bank are insured by the FDIC. You should explain that all accounts earn some interest; a savings account’s interest is compounded monthly. You should assign a unique account number after accepting the customer’s initial deposit. If the
customer chooses to receive statements electronically, the system will send an e-mail with a monthly statement; if the customer chooses not to, then a paper statement will be sent by mail quarterly.
If savings account is a class, give an example of each of the following as it relates to that savings account. Explain your reasoning behind your example.
• Superclass
• Subclass
Supporting Activity: “is-a”
Using an example from your work or daily life, describe an “is-a” relationship. Why is an “is-a” relationship important when designing an inheritance between classes? What are the differences between “is-a” and “has-a” relationship?
PRG420 Java Programming I
Week 5 Discussion
Comparisons of Time and Date
This week’s supporting activity asks you to create a simple Java™ app that identifies and displays information about the current date, time, and day of week.
If you were not able to complete the Supporting Activity, “Working with Dates,” successfully, post the problems you are having with the code. What compiler error appears? If your code compiles, what incorrect output appears?
If you were able to complete the Supporting Activity, “Working with Dates,” successfully, help your classmates who are having difficulties.
Research and discuss how you could add to the supporting activity’s code by including this comparison:
If today’s date is later than January 1, 1980, display “Today is later than January 1, 1980” on the console.
If today’s date is earlier than January 1, 2020, display “Today is earlier than January 1, 2020” on the console.
What Java™ methods would you use to code these new requirements?
If you get one or both of these comparisons to work, post the code for your classmates to see.
Supporting Activity: 3 Biggest Challenges
In your opinion, what are the three biggest challenges in planning and designing a solution for a programming problem? What can you do to overcome these challenges? How would you apply these techniques to the programs in this class?
Collepals.com Plagiarism Free Papers
Are you looking for custom essay writing service or even dissertation writing services? Just request for our write my paper service, and we'll match you with the best essay writer in your subject! With an exceptional team of professional academic experts in a wide range of subjects, we can guarantee you an unrivaled quality of custom-written papers.
Why Hire Collepals.com writers to do your paper?
Quality- We are experienced and have access to ample research materials.
We write plagiarism Free Content
Confidential- We never share or sell your personal information to third parties.
Support-Chat with us today! We are always waiting to answer all your questions.