Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please show code and output in java all pictures are available to allow clear picture of the assignment Instruction_SP2020_LAB3_Accessibility (3).docx - Protected View - Saved

image text in transcribed

image text in transcribed

please show code and output in java

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

all pictures are available to allow clear picture of the assignment

Instruction_SP2020_LAB3_Accessibility (3).docx - Protected View - Saved Search lailings Review View Help Enable Editing Es you need to edit, it's safer to stay in Protected View Steps: debug if there are any errors to complete the program REQUIREMENT LAB3 PART1 IF YOU DO NOT HAVE THE UML and PSEUDO-CODE, YOU HAVE TO READ THE BELOW REQUIREMENT THEN CREATE UML OF DATA TYPE CLASS AND WRITE THE PSEUDO-CODE BEFORE WRITING THE CODE This part we learn how to do for the data type class and from the main() how to create the object of data type class and how to use object to access public members of data type class Requirement: Provide an application named DriverClassDemo to help users to calculate the area of any rectangle if the users enter the value of length and width of a rectangle. For example: if users enter the length and width of a rectangle are: 5.25 and 3.42 the output will be DriverClassDemo_Martinez java RECTANGLE Length: 5.25 Width: 3.42 Area: 17.95 Since this requirement only talks about the rectangle, therefore, we need a data type named Rectangle_yourLastName. DATA TYPE CLASS UML of a data type class looks like a table with 1 column x 3 rows as below: -The first row: the name of data type class in the center The first row the name of dat The second row: list data members (fields of the object. Minus sign(-) means private access, length and width are the name of fields and double is data type of fields The third row: list constructors, mutator methods, accessor methods, method toString() and other method. Plus sip() means publicsetlength().getlength{], setWidth() getWidth), area().toString are the names of methods Rectangle_Martinez -length double width: double +Rectangle *Rectangleflen: double, w: double) setlengthen: double): void setWidth[w: double): void getlength(): double getwidth(): double area(): double toString(): String Download the class Rectangle.java from eCampus for your reference of data type class to learn how to declare data members, how to write constructor, mutator method, accessor method, toString] DRIVER CLASS First display message to ask and read the length and width of a rectangle from the keyboard Create the object of data type class Rectangle_your LastName by call the parameter constructor Use the object that have created above to access the method toString) to display the output InstuciON SPZOZO_LABS Accessibility (3).docx - Protected View - Saved Search lailings Review View Help s you need to edit, it's safer to stay in Protected View Enable Editing Rectangle_Martinez ength: double -width: double +Rectangle +Rectangle(len: double, w: double) +setlengthlen: double): void setWidth(w: double): void +getlength(): double +getwidth(): double areal): double toString(): String Download the dass Rectangle.java from eCampus for your reference of data type class to learn how to declare data members, how to write constructor, mutator method, accessor method, tostring DRIVER CLASS First display message to ask and read the length and width of a rectangle from the keyboard Create the object of data type class Rectangle_your lastName by call the parameter constructor Use the object that have created above to access the method toStringl) to display the output REQUIREMENT: *change yourLastName to your last name *Change Martinez to your last name *write the file name as the first comment line at the top of program *After running your program, get the picture of the output window from your program with your name on to paste at the bottom of the pseudo-code to turn in LAB2 PART2 IF YOU DO NOT HAVE THE PSEUDO-CODE, YOU HAVE TO READ THE BELOW REQUIREMENT THEN WRITE THE PSEUDO-CODE BEFORE WRITING THE CODE Create a project named SP2020_LABSPART2_LastName provide the UML of class Employee_yourLastName and pseudo-code of the following requirement. DATA TYPE CLASS -Data type class named Employee_yourl.astName should include data members of name (String), employee id (String, hourly salary rate (floatand number of work hours in two weeks (int); no argument constructor, parameter constructor, mutator methods and accessor methods of each data member; methods to calculate the salary and method toString to provide the output as below. The numbers are aligned to the right with 2 decimal digits Bicklypay Martiner.java BIMEKLY PAYNENT OF LOVE Mary Lane Salary Rate: Number of work hours: 1950. Gross Pay: Federal Income Tax Social Security Tax! Medicare Tak: 121.5 28.4 Enable Editing ou need to edit it's safer to stay in Protected View. PSEUDO-CODE BEFORE WRITING THE CODE Create a project named SP2020 LABUPARTZ LastName provide the UML of class Employee_yourLastName and pseudo-code of the following requirement, DATA TYPE CLAS5 -Datatype dass named Employee yourLastName should include data members of name (Strinel employee id (String), hourly salary rate (float) and number of work hours in two weeks (int); no-argument constructor, parameter constructor, mutator methods and accessor methods of each data member; methods to calculate the salary and method toString to provide the output as below. The numbers are aligned to the right with 2 decimal digits BiweeklyPay_Martinez.java BIMEEKLY PAYMENT OF EMPLOYEE Number: Nane: Salary Rate: Number of work hours: 12344567 Mary Lane 24.5 1960. 171.3 Gross Pay: Federal Income Tax: Social Security Tax: Medicare Tax 121.5 Net pay 1638.8 DRIVER CLASS Provide the application named BiweeklyPay yourLastName based on Object Oriented programming The program will prompt to read all information of an employee that users want to print out the salary slip including last name (string), first name (string), employee id (String), hourly salary rate (float) and number of work hours in two weeks (int) from the keyboard, create the object of class Employee your lastName then print out the biweekly pay slip by calling a method from class Employee The following rates should be defined as constants: The syntax declare a constant: final float variableName = 1.45 Federal income tax rate = 8.74% Social Security tax rate = 6.20% Medicare tax rate = 1.45% Formulas: Gross paysalary rate number of work hours Federal income tax = Gross pay Federal income tax rate Social security tax = Gross pay Social Security tax rate Medicare tax =Gross pay. Medicare tax rate Net pay Gross pay-(Federal income tax+ Social Security tax+ Medicare tax) REQUIREMENT: *Change Martinez to your last name Change Mary Lane to the name of user who is using the BMI Application entered from the keyboard *Write the file name as the first comment line at the top of program write the comments to explain each part of the program *After running your program, get the picture of the output window from your program with your name on to paste at the bottom of the pseudo-code to turn in *The output should be called the method toString() from the data type class HOW TO TURN IN THE LAR *Step3. Based on the UML of data type dass, write the code of data type class Based on the pseudo-code or flowchart, write the code of main() in driver class *Step:4 compile and run the program *Steps: debug if there are any errors to complete the program REQUIREMENT LAB3 PART1 IF YOU DO NOT HAVE THE UML and PSEUDO-CODE, YOU HAVE TO READ THE BELOW REQUIREMENT THEN CREATE UML OF DATA TYPE CLASS AND WRITE THE PSEUDO-CODE BEFORE WRITING THE CODE This part we learn how to do for the data type class and from the main() how to create the object of data type class and how to use object to access public members of data type class Requirement: Provide an application named DriverClassDemo to help users to calculate the area of any rectangle if the users enter the value of length and width of a rectangle. For example: if users enter the length and width of a rectangle are: 5.25 and 3.42 the output will be: DriverClassDemo Martinez.java RECTANGLE Length: 5.25 Width: 3.42 Area: 17.95 Since this requirement only talks about the rectangle, therefore, we need a data type named Rectangle yourLastName DATA TYPE CLASS UML of a data type class looks like a table with 1 column X 3 rows as below: The first row. the name of data type class in the center -The second row: list data members (fields) of the object. Minus sign (-) means private access, length and width are the name of fields and double is data type of fields -The third row list construtors mutator methodkr omathadi mothad toitain and thar mnthodinu -The second row: list data members (fields) of the object. Minus sign (-) means private access, length and width are the name of fields and double is data type of fields -The third row: list constructors, mutator methods, accessor methods, method toString() and other method. Plus sign (4) means public, settength().getlength().setWidth() getWidth(), areal), toString() are the names of methods Rectangle_Martinez Hength: double -width: double +Rectangle +Rectangle(len: double, w: double) #setlength{len: double): void +SetWidth(w: double): void +getlength(): double gerWidth(): double tarea: double +toString(): String Download the class Rectangle.java from eCampus for your reference of data type class to learn how to declare data members, how to write constructor, mutator method, accessor method, toString DRIVER CLASS First display message to ask and read the length and width of a rectangle from the keyboard Create the object of data type class Rectangle_yourLastName by call the parameter constructor Use the object that have created above to access the method toString() to display the output REQUIREMENT: *Change your lastName to your last name *Change Martinez to your last name *Write the file name as the first comment line at the top of program *After running your program, get the picture of the output window from your program with your name on to paste at the bottom of the pseudo-code to turn in LAB2 PART2 IF YOU DO NOT HAVE THE PSEUDO-CODE, YOU HAVE TO READ THE BELOW REQUIREMENT THEN WRITE THE PSEUDO-CODE BEFORE WRITING THE CODE Create a project named SP2020_LAB3PART2_LastName provide the UML of class Employee_yourLastName and pseudo-code of the following requirement, -The second row: list data members (fields) of the object. Minus sign (- means private access, length and width are the name of fields and double is data type of fields -The third row: list constructors, mutator methods, accessor methods, method toString() and other method. Plus sign (+) means public, setLength().getLength(), setWidth() getWidth(), area(), toString() are the names of methods Rectangle Martinez -length: double -width: double +Rectangle +Rectangleflen: double, w: double) +setlength{len: double): void +setWidth(w: double): void +getLength(): double +getWidth(): double +area: double +toString(): String Download the class Rectangle.java from eCampus for your reference of data type class to learn how to declare data members, how to write constructor, mutator method, accessor method, tostring) DRIVER CLASS First display message to ask and read the length and width of a rectangle from the keyboard create the object of data type class Rectangle_your LastName by call the parameter constructor Use the object that have created above to access the method toString() to display the output REQUIREMENT: *change yourLastName to your last name *change Martinez to your last name *Write the file name as the first comment line at the top of program After running your program, get the picture of the output window from your program with your name on to paste

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

Relational Database Technology

Authors: Suad Alagic

1st Edition

354096276X, 978-3540962762

More Books

Students also viewed these Databases questions

Question

explain what is meant by the terms unitarism and pluralism

Answered: 1 week ago