Question: 01 (Marks: 10)View more random threads:
- CS302 Digital Logic Design Assignment No.1 Solution Spring...
- CS101 Introduction to Computing Assignment No.2 Solution...
- ISL201 Islamic Studies First Assignment idea solution...
- CS301 First Assignment idea solution October, fall 2012
- ENG301 Business Communication Discussions about Assignment...
- MTH302 Business Mathematics & Statistics Assignment No 1...
- MGT211 Introduction to Business Assignment No 01 Semester...
- CS101 Introduction to Computing Assignment No. 5 Semester...
- CS101 Introduction to Computing Assignment No.4 Fall...
- MGT402 Cost & Management Accounting Assignment No.1 Fall...
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.
Question: 02 (Marks: 10)
Sponsored Links
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.
There are currently 1 users browsing this thread. (0 members and 1 guests)