Question: 01 (Marks: 10)View more random threads:
- E-Commerce (IT 430) Semester Spring 2013
- CS302 Digital Logic Design Assignment No.1 Solution Spring...
- MTH 101 Calculus And Analytical Geometry Assignment No.1...
- MTH202 First Assignment idea solution October, fall 2012
- MTH 101 Calculus And Analytical Geometry Assignment No.2...
- CS302 First Assignment idea solution October, fall 2012
- MGT101 FINANCIAL ACCOUNTING Assignment No. 1 Spring...
- Pak 301 Pakistan Studies Assignment No.1 Spring April 9 2012
- ECO404 Managerial Economics assignment no 1 spring fall 2011
- Eng101 English Comprehension Assignment No.2 Fall Semester...
In Java programming language declaring array is reference to array object, it means declaring an array would only declare a pointer to array object while the memory to array elements will allocate only when the “new” keyword is used.
Write a Java program which declares an array of size 5. This array stores the marks of five courses of a student. Use “for” loop which add the marks of all courses. Your program must display marks of individual courses as well as the total marks of the student.
Sponsored Links
Question: 02 (Marks: 10)
Write a program in Java which declares a class named “Employee” having three data members “Emp_name”, “Designation” and “Salary” which store employee name, designation and salary respectively.
The class should have default constructor, parameterize constructor and a method “Display” which print the information of employee.
Further, your program should have a main class “TestEmployee” which declare (create) two objects one with default constructor and one with parameterized constructor. Also call “Display” method with both objects.