Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Paragraph E Title No Spacing Heading 2 Subtle Em 1 2 3 4 Styles 5 6 Adam has developed other methods in the class,

image text in transcribedimage text in transcribed

Paragraph E Title No Spacing Heading 2 Subtle Em 1 2 3 4 Styles 5 6 Adam has developed other methods in the class, but he does not want those methods to be called by any derived classes. What access modifier should he use for those methods? Define other access modifiers that he can use in different scenarios with respect to the given program. 10 marks Question 9 The school expects to implement concept of Object-oriented programming concepts (OOPs) a. Write the snippet to define a class 'Student' with required attributes/states and methods/behavior to calculate the grade. b. Write the constructor to initialize the attributes student name, GPA and credithoursAttempted. c. Create an instance/object of class 'Student' passed with student name, GPA and credit hours. d. Show how one can implement polymorphism and encapsulation in the given program. You are appointed by a local consulting company for a project to design and implement an employee's records system. The work is to develop a program that calculates each employee's total salary based on the Grade level as shown in the figure below. Employee_Grade Base_Salary Bonus 5 80,000 30% 4 70000 25% 3 60000 20% 2 50000 15% 1 40000 10% The formula to evaluate total salary is: Total_salary = Base salary + (bonus* base_salary)/100. You are asked to write snippets (small pieces of reusable code) based on the questions that you might consolidate and use in the final program. Make necessary assumptions if required. The company expects to implement concept of Object-oriented programming concepts (OOPs) a. Write the snippet to define a class 'Employee' with required attributes/states and methods/behavior to calculate the salary. b. Write the constructor to initialize the attributes such as employee name, employee id and grade. c. Create an instance/object of class 'Employee' passed with employee name, employee id and grade. Show how one can implement polymorphism and encapsulation in the given program (C#)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Computer Networking A Top-Down Approach

Authors: James Kurose, Keith Ross

7th edition

978-0133594140

More Books

Students also viewed these Computer Network questions

Question

64. Consider a branching process having Answered: 1 week ago

Answered: 1 week ago