Question: use Neatbeans # 3.13 # 3.12 Chapter 3 Introduction to Classes, Objects, Methods and Strings instance v item being pur that initializes the four instance

use Neatbeans use Neatbeans # 3.13 # 3.12 Chapter 3 Introduction to Classes, Objects,

# 3.13

Methods and Strings instance v item being pur that initializes the four

# 3.12

Chapter 3 Introduction to Classes, Objects, Methods and Strings instance v item being pur that initializes the four instance variables. Provide a set and a get method for each es -a part number (type String), a part description (type String), a quantity of the type int) and a price per item (double). Your class should have a constructor 0 instance variable. In addition, provide a method named getinvoiceAmount that calculates the invoice amount (i.e. tem), then returns the amount as a double value. If the quantity is not positive, it should be set to 0. If the price per item is not positive, it should be set to multiplies the quantity by the price per i 0.0. Write a test app named InvoiceTest that demonstrates class Invoice's capabilities. (Employee Class) Create a class called Employee that includes three instance variables-a first name (type String), a last name (type String) and a monthly salary (double). Provide a constructor that initializes the three instance variables. Provide a set and a get method for each instance variable. If the monthly salary is not positive, do not set its value. Write a test app named EmployeeTest that demonstrates class Employee's capabilities. Create two Employee objects and display each object's rly salary. Then give each Employee a 10% raise and display each Employee's yearly salary again. 3.14 (Date Class) Create a class called Date that includes three instance variables-a month (type int), a day (type int) and a year (type int). Provide a constructor that initializes the three instance variables and assumes that the values provided are correct. Provide a set and a get method for each instance variable. Provide a method displayDate that displays the month, day and year separated by forward slashes (/). Write a test app named DateTest that demonstrates class Date's capabilities. 3.13 2 3.15 (Removing Duplicated Code in Method main) In the AccountTest cla main contains six statements (lines 11-12, 13-14, 26-27, 28-29, 38-39 and 40-41 play an Account object's name and balance. Study these statements and you'll notice th ss of Fig. 3.9, method ) that each dis- Scounti or account2, In this exercise vou def

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!