Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

MINISTRY OF HER IXO ANILL KAHWINN BABUL UNIVERSAL WALINITY EXLE WALLS Object Oriented Programming Term 2, Year 2020/2021 Assignment 1 Student Name: Please be sure

image text in transcribed

MINISTRY OF HER IXO ANILL KAHWINN BABUL UNIVERSAL WALINITY EXLE WALLS Object Oriented Programming Term 2, Year 2020/2021 Assignment 1 Student Name: Please be sure to follow the naming standards in this Qui sommes that are one in the last instruction below will not be cmed Question 1: a) Create a class Under Grad with 5 variables: age (int), activity (String), name (String), private grude (double), bonus (double) b) Create a mutator for the variable grade. c) Create a method display to print all the variables. Create method Mathl of the type void that takes X (int) and determine if it is an odd number or not. c) Create a method increase Bonus that takes amount (double) and increase the bonus that amount. (make sure to use a return-type method) Create a default constructor that gives bonus a default value of 100 Create an argument constructor that takes age, activity, and nume and gives bonus al value of 100 h) Delimu ohject UG1 and use constructor in part F L) Detine UG2 and use constructor in pert G j) Set the grade for UGI and UG2 (using scanner) ki Increase the bonus for UG1 by 235 1) Print all the details for both UG1 and UG2 using display method in part Paste your screenshot here and upload this file

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

Moving Objects Databases

Authors: Ralf Hartmut Güting, Markus Schneider

1st Edition

0120887991, 978-0120887996

More Books

Students also viewed these Databases questions

Question

What is the most important part of any HCM Project Map and why?

Answered: 1 week ago