Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Design a class named Mylnteger. The class contains: [10%] An int data field named value that stores the int value represented by this object.

image text in transcribed

Design a class named Mylnteger. The class contains: [10%] An int data field named value that stores the int value represented by this object. [10%] A constructor that creates a MyInteger object for the specified int value. [10%] The static methods is Even(int), isOdd(int), and isPrime(int) that return true if the specified value is even, odd, or prime, respectively. [10%] The methods isEven(), isOdd(), and isPrime() that return true if the value in this object is even, odd, or prime, respectively. [5%] A getter method that returns the int value. [5%] Write a tester program that take input from the user as an integer and then check/tests all the methods you have designed Task2 50% Upgrade Week 5 Example Fig09_10_11 to include a BonusPlusCommission Employee: [10%] Extends the CommissionEmployee Class [5%] A double data field named bonus that stores the bonus employee gets. This bonus is also a percentage of the gross sales. [10%] A constructor that creates a BonusPlusCommission Employee object. The total of commission and bonus rate should not exceed 20% of the gross sales [10%] override earnings, so that bonus is awarded if the gross sales is over $CAD 1Million Dollar [5%] override toString [5%] Setters and getters for the bonus [5%] Update the tester program for Fig09_10_11 to include testing for this class

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

Introduction to Wireless and Mobile Systems

Authors: Dharma P. Agrawal, Qing An Zeng

4th edition

1305087135, 978-1305087132, 9781305259621, 1305259629, 9781305537910 , 978-130508713

More Books

Students also viewed these Programming questions