Free Essay

Sd2720 Module 1 Java Basics Refresher

In: Business and Management

Submitted By Laynebaril
Words 528
Pages 3
SD2720 Module 1 Java Basics Refresher

Click Link Below To Buy:

http://hwcampus.com/shop/sd2720-module-1-java-basics-refresher/

Lab 1.1 Creating Java Application

In this lab, you will complete three tasks related to Java classes, their attributes, and error handling in a Java program. The task performed in this lab will help you understand how to break a complex software program into various classes by using object-orientated programming.
Task 1
Scenario: Universal Bank offers various services to its customers. The bank has various branches all over the country and therefore, each branch has a unique code. The bank stores the details of its customers such as customer ID, customer name, account number, address, phone number, and email address. In addition, the bank offers its customers a choice of accounts, such as savings account, current account, and loan account. In addition, the bank stores its employee details, such as employee code, employee name, employee address, phone number, and email address.
For the given scenario, complete the following:
• Identify the various classes and their attributes used in this scenario.
• Create a UML class diagram depicting the relationship among classes for the customer and employee information system of Universal Bank.
• Create the Java code to implement the identified classes.
• Assign values to the identified attributes.
• Display the attribute values.

Task 2
Scenario: Royal College offers different courses to its students. Whenever a student enrolls for a course, the student details, such as Registration Number, Department Name, and Permanent Address, Email ID, and Phone Number, are registered.
For the given scenario, write a Java program using the Scanner class to get these student details from the user. Task 3
Analyze and identify the errors in the following Java code and rewrite the code. class Course
{
String courseCode, courseName; int duration;
}
public class CourseTest
{
public static void main()
{
Course c;
c.courseCode = "C0001";
c.courseName = "Programming in Java";
c.duration = 4;
System.out.println("Course Code + " + c.courseCode);
System.out.println("Course Name + " + c.courseName);
System.out.println("Course Duration in Months: " + c.duration);
}
}
Submission Requirements:
Compress your Java project folder and responses in a Microsoft Word document into one zipped folder and submit it to the instructor.
Note: Use the following procedure to compress the project folders into one zipped folder: http://windows.microsoft.com/en-US/windows-vista/Compress-and-uncompress-files-zip-files For Task 1
• Does the code meet all functional requirements?
• Did you identify various classes and their attributes?
• Did you assign value to the identified attributes?
• Did you create a UML class diagram depicting the relationships among classes for the customer and employee information system of Universal Bank?
• Did you display the attribute values?
• Is the code readable and documented?

For Task 2
• Did you use the Scanner class to write the Java program to get the student details?
• Does the code meet all the functional requirements?
• Did you use the Scanner class to get the attribute values?
• Is the code readable and documented?

For Task 3
• Did you identify the errors in the given code?
• Did you rewrite the code rectifying the identified errors?
• Is the code readable and documented?

Similar Documents

Free Essay

Sd2720 Module 1 Java Basics Refresher

...SD2720 Module 1 Java Basics Refresher Click Link Below To Buy: http://hwcampus.com/shop/sd2720-module-1-java-basics-refresher/ Lab 1.1 Creating Java Application In this lab, you will complete three tasks related to Java classes, their attributes, and error handling in a Java program. The task performed in this lab will help you understand how to break a complex software program into various classes by using object-orientated programming. Task 1 Scenario: Universal Bank offers various services to its customers. The bank has various branches all over the country and therefore, each branch has a unique code. The bank stores the details of its customers such as customer ID, customer name, account number, address, phone number, and email address. In addition, the bank offers its customers a choice of accounts, such as savings account, current account, and loan account. In addition, the bank stores its employee details, such as employee code, employee name, employee address, phone number, and email address. For the given scenario, complete the following: • Identify the various classes and their attributes used in this scenario. • Create a UML class diagram depicting the relationship among classes for the customer and employee information system of Universal Bank. • Create the Java code to implement the identified classes. • Assign values to the identified attributes. • Display the attribute values. Task 2 Scenario: Royal College offers different...

Words: 528 - Pages: 3