SlideShare a Scribd company logo
1 of 7
Download to read offline
***Please help!! This is the third time I'm posting this
question*** ***All the instructions, sample output and previous HW5 paystub are
down below please scroll down to view them.*** HW6: Paystub for Employee CSS 161
Fundamentals of Computing By: Hansel Ong Summary So far you have kept track of hours
worked for only one employee. However, this is obviously not sustainable as companies
typically have more than one employee some companies even have over 100,000 employees!
Let's use the object-oriented programming (OOP) paradigm to simplify data collection and
storage Estimated Work Needed This assignment took me about 30-45 minutes to write (not
including challenges, but including testing, commenting, and cleanup) in less than 200 lines of
code (total across three Java files) In other words, you should expect to spend between 135 to
450 minutes working on this assignment. If you've spent more than 7.5 hours working on this
assignment, then you are likely struggling with arrays, loops, basic class design, methods, and
the use of the new scope and should re-read the lecture slides (and attempt the exercises within),
seek help from your fellow classmates, myself, your lab instructor, QSC tutor, as well as online
resources. Skills Expected All the skills from previous Assignment(s) Class Object and Design,
including but not limited to o Instance Variables o Getter and Setter (including input validation
in Setters o Constructor o Methods Assignment Description You will write three Class objects
(and subsequently submit three .java files): Paystub Employee EmployeeDriver Notes: ONLY
the EmployeeDriver class should have static methods. · All the other classes should NOT have
static methods or instance variables. Constants should still be static final The below is the
minimum you must include-you could include additional instance variables, methods, etc. as you
need
Solution
//EXAMPLE PROGRAM FOR SINGLE LINKED LIST
# include
# include
# include
# include
struct list
{
int number;
struct list *next;
};
typedef struct list node;
node *first,*prev,*temp,*curr;
void create(void)
{
printf(" Stop by -999");
temp=(node *)(malloc(sizeof(node)));
printf(" Enter the numbers ");
scanf("%d",&temp->number);
while(temp->number!=-999)
{
temp->next=NULL;
if(first==NULL)
{
first=temp;
prev=first;
}
else
{
prev->next=temp;
prev=temp;
}
temp=(node *)(malloc(sizeof(node)));
scanf("%d",&temp->number);
} //end of while
}
void delete1(void)
{
int num;
printf(" Enter the number to delete ");
scanf("%d",&num);
if(first->number==num)
{
first=first->next;
return;
}
else
{
prev=first;
curr=first->next;
while(curr->next!=NULL)
{
if(curr->number==num)
{
prev->next=curr->next;
return;
}
prev=curr;
curr=curr->next;
}
}
if(curr->number==num)
{
prev->next=NULL;
return;
}
printf(" No such number");
}
void insertbefore(void)
{
int nu;
temp=(node *)(malloc(sizeof(node)));
printf(" Enter the number ");
scanf("%d",&temp->number);
printf(" Insert before which number ");
scanf("%d",&nu);
temp->next=NULL;
prev=first;
curr=first;
if(first==NULL) //if the list is empty then we can insert in this way
{
first=temp;
return;
}
if(curr->number==nu)
{
temp->next=first;
first=temp;
return;
}
else
{
prev=curr;
curr=curr->next;
while(curr->next!=NULL)
{
if(curr->number==nu)
{
prev->next=temp;
temp->next=curr;
return;
}
prev=curr;
curr=curr->next;
}
}
if(curr->number==nu)
{
prev->next=temp;
temp->next=curr;
return;
}
printf(" No such number ");
}
void insertafter(void)
{
int nu;
temp=(node *)(malloc(sizeof(node)));
printf(" Enter the number ");
scanf("%d",&temp->number);
printf(" Insert after which number ");
scanf("%d",&nu);
temp->next=NULL;
prev=first;
curr=first;
if(first==NULL) //if the list is empty then we can insert in this way
{
first=temp;
return;
}
if(curr->number==nu)
{
temp->next=curr->next;
curr->next=temp;
return;
}
else
{
prev=curr;
curr=curr->next;
while(curr->next!=NULL)
{
if(curr->number==nu)
{
temp->next=curr->next;
curr->next=temp;
return;
}
prev=curr;
curr=curr->next;
}
}
if(curr->number==nu)
{
curr->next=temp;
return;
}
printf(" No such number ");
}
void print(void)
{
printf(" The list is  ");
printf(" ----------- ");
temp=first;
while(temp!=NULL)
{
printf("%d-->",temp->number);
temp=temp->next;
}
printf("Nil");
getch();
}
void main()
{
int ch=0;
first=NULL;
clrscr();
printf(" Linked List creation  ");
create();
clrscr();
while(ch!=5)
{
clrscr();
printf(" 1.Insert Before");
printf(" 2.Insert After");
printf(" 3.Delete ");
printf(" 4.Print ");
printf(" 5.Exit ");
printf(" Enter your choice ");
scanf("%d",&ch);
switch(ch)
{
case 1:
insertbefore();
print();
break;
case 2:
insertafter();
print();
break;
case 3:
delete1();
print();
break;
case 4:
print();
break;
case 5:
print();
exit(1);
}
}
getch();
}

More Related Content

Similar to Please .pdf

CS 111 - Homework 5 p. 1CS 111 - Homework 5Deadline1.docx
CS 111 - Homework 5 p. 1CS 111 - Homework 5Deadline1.docxCS 111 - Homework 5 p. 1CS 111 - Homework 5Deadline1.docx
CS 111 - Homework 5 p. 1CS 111 - Homework 5Deadline1.docxannettsparrow
 
Object Oriented Programming in Matlab
Object Oriented Programming in Matlab Object Oriented Programming in Matlab
Object Oriented Programming in Matlab AlbanLevy
 
Data structures and algorithms lab2
Data structures and algorithms lab2Data structures and algorithms lab2
Data structures and algorithms lab2Bianca Teşilă
 
Data Structures- Part1 overview and review
Data Structures- Part1 overview and reviewData Structures- Part1 overview and review
Data Structures- Part1 overview and reviewAbdullah Al-hazmy
 
ProgFund_Lecture_4_Functions_and_Modules-1.pdf
ProgFund_Lecture_4_Functions_and_Modules-1.pdfProgFund_Lecture_4_Functions_and_Modules-1.pdf
ProgFund_Lecture_4_Functions_and_Modules-1.pdflailoesakhan
 
Objectives Assignment 09 Applications of Stacks COS.docx
Objectives Assignment 09 Applications of Stacks COS.docxObjectives Assignment 09 Applications of Stacks COS.docx
Objectives Assignment 09 Applications of Stacks COS.docxdunhamadell
 
PYTHON PROGRAMMING
PYTHON PROGRAMMINGPYTHON PROGRAMMING
PYTHON PROGRAMMINGindupps
 
CSE 1310 – Spring 21Introduction to ProgrammingLab 4 Arrays and Func
CSE 1310 – Spring 21Introduction to ProgrammingLab 4 Arrays and FuncCSE 1310 – Spring 21Introduction to ProgrammingLab 4 Arrays and Func
CSE 1310 – Spring 21Introduction to ProgrammingLab 4 Arrays and FuncMargenePurnell14
 
utPLSQL: Unit Testing for Oracle PL/SQL
utPLSQL: Unit Testing for Oracle PL/SQLutPLSQL: Unit Testing for Oracle PL/SQL
utPLSQL: Unit Testing for Oracle PL/SQLSteven Feuerstein
 
INFORMATIVE ESSAYThe purpose of the Informative Essay assignme.docx
INFORMATIVE ESSAYThe purpose of the Informative Essay assignme.docxINFORMATIVE ESSAYThe purpose of the Informative Essay assignme.docx
INFORMATIVE ESSAYThe purpose of the Informative Essay assignme.docxcarliotwaycave
 
Introduction to c first week slides
Introduction to c first week slidesIntroduction to c first week slides
Introduction to c first week slidesluqman bawany
 
Part 1 SQLDatabase workScenarioDevelopment of a relationa.docx
Part 1 SQLDatabase workScenarioDevelopment of a relationa.docxPart 1 SQLDatabase workScenarioDevelopment of a relationa.docx
Part 1 SQLDatabase workScenarioDevelopment of a relationa.docxMARRY7
 
Milot Shala - C++ (OSCAL2014)
Milot Shala - C++ (OSCAL2014)Milot Shala - C++ (OSCAL2014)
Milot Shala - C++ (OSCAL2014)Open Labs Albania
 
Ecs 10 programming assignment 4 loopapalooza
Ecs 10 programming assignment 4   loopapaloozaEcs 10 programming assignment 4   loopapalooza
Ecs 10 programming assignment 4 loopapaloozaJenniferBall44
 
SMP4 Thread Scheduler (PART 1)======================INS.docx
SMP4 Thread Scheduler (PART 1)======================INS.docxSMP4 Thread Scheduler (PART 1)======================INS.docx
SMP4 Thread Scheduler (PART 1)======================INS.docxpbilly1
 
Bt0065, c programming and data structures
Bt0065, c programming and data structuresBt0065, c programming and data structures
Bt0065, c programming and data structuressmumbahelp
 
Templates presentation
Templates presentationTemplates presentation
Templates presentationmalaybpramanik
 

Similar to Please .pdf (20)

CS 111 - Homework 5 p. 1CS 111 - Homework 5Deadline1.docx
CS 111 - Homework 5 p. 1CS 111 - Homework 5Deadline1.docxCS 111 - Homework 5 p. 1CS 111 - Homework 5Deadline1.docx
CS 111 - Homework 5 p. 1CS 111 - Homework 5Deadline1.docx
 
Object Oriented Programming in Matlab
Object Oriented Programming in Matlab Object Oriented Programming in Matlab
Object Oriented Programming in Matlab
 
Data structures and algorithms lab2
Data structures and algorithms lab2Data structures and algorithms lab2
Data structures and algorithms lab2
 
Ot performance webinar
Ot performance webinarOt performance webinar
Ot performance webinar
 
Data Structures- Part1 overview and review
Data Structures- Part1 overview and reviewData Structures- Part1 overview and review
Data Structures- Part1 overview and review
 
ProgFund_Lecture_4_Functions_and_Modules-1.pdf
ProgFund_Lecture_4_Functions_and_Modules-1.pdfProgFund_Lecture_4_Functions_and_Modules-1.pdf
ProgFund_Lecture_4_Functions_and_Modules-1.pdf
 
Objectives Assignment 09 Applications of Stacks COS.docx
Objectives Assignment 09 Applications of Stacks COS.docxObjectives Assignment 09 Applications of Stacks COS.docx
Objectives Assignment 09 Applications of Stacks COS.docx
 
PYTHON PROGRAMMING
PYTHON PROGRAMMINGPYTHON PROGRAMMING
PYTHON PROGRAMMING
 
CSE 1310 – Spring 21Introduction to ProgrammingLab 4 Arrays and Func
CSE 1310 – Spring 21Introduction to ProgrammingLab 4 Arrays and FuncCSE 1310 – Spring 21Introduction to ProgrammingLab 4 Arrays and Func
CSE 1310 – Spring 21Introduction to ProgrammingLab 4 Arrays and Func
 
Ansible testing
Ansible   testingAnsible   testing
Ansible testing
 
utPLSQL: Unit Testing for Oracle PL/SQL
utPLSQL: Unit Testing for Oracle PL/SQLutPLSQL: Unit Testing for Oracle PL/SQL
utPLSQL: Unit Testing for Oracle PL/SQL
 
INFORMATIVE ESSAYThe purpose of the Informative Essay assignme.docx
INFORMATIVE ESSAYThe purpose of the Informative Essay assignme.docxINFORMATIVE ESSAYThe purpose of the Informative Essay assignme.docx
INFORMATIVE ESSAYThe purpose of the Informative Essay assignme.docx
 
Introduction to c first week slides
Introduction to c first week slidesIntroduction to c first week slides
Introduction to c first week slides
 
Part 1 SQLDatabase workScenarioDevelopment of a relationa.docx
Part 1 SQLDatabase workScenarioDevelopment of a relationa.docxPart 1 SQLDatabase workScenarioDevelopment of a relationa.docx
Part 1 SQLDatabase workScenarioDevelopment of a relationa.docx
 
Milot Shala - C++ (OSCAL2014)
Milot Shala - C++ (OSCAL2014)Milot Shala - C++ (OSCAL2014)
Milot Shala - C++ (OSCAL2014)
 
pm1
pm1pm1
pm1
 
Ecs 10 programming assignment 4 loopapalooza
Ecs 10 programming assignment 4   loopapaloozaEcs 10 programming assignment 4   loopapalooza
Ecs 10 programming assignment 4 loopapalooza
 
SMP4 Thread Scheduler (PART 1)======================INS.docx
SMP4 Thread Scheduler (PART 1)======================INS.docxSMP4 Thread Scheduler (PART 1)======================INS.docx
SMP4 Thread Scheduler (PART 1)======================INS.docx
 
Bt0065, c programming and data structures
Bt0065, c programming and data structuresBt0065, c programming and data structures
Bt0065, c programming and data structures
 
Templates presentation
Templates presentationTemplates presentation
Templates presentation
 

More from mohammedfootwear

Getting some errors when trying to run this program, can anyone help.pdf
Getting some errors when trying to run this program, can anyone help.pdfGetting some errors when trying to run this program, can anyone help.pdf
Getting some errors when trying to run this program, can anyone help.pdfmohammedfootwear
 
Discuss what is meant by Project Scope ManagementSolutionA pr.pdf
Discuss what is meant by Project Scope ManagementSolutionA pr.pdfDiscuss what is meant by Project Scope ManagementSolutionA pr.pdf
Discuss what is meant by Project Scope ManagementSolutionA pr.pdfmohammedfootwear
 
Determine if statement is true or false. If johnny likes suzy the ri.pdf
Determine if statement is true or false. If johnny likes suzy the ri.pdfDetermine if statement is true or false. If johnny likes suzy the ri.pdf
Determine if statement is true or false. If johnny likes suzy the ri.pdfmohammedfootwear
 
Describe one safeguard that should be in place to protect the confid.pdf
Describe one safeguard that should be in place to protect the confid.pdfDescribe one safeguard that should be in place to protect the confid.pdf
Describe one safeguard that should be in place to protect the confid.pdfmohammedfootwear
 
Create a storyboard prototype of a mobile app.When creating a stor.pdf
Create a storyboard prototype of a mobile app.When creating a stor.pdfCreate a storyboard prototype of a mobile app.When creating a stor.pdf
Create a storyboard prototype of a mobile app.When creating a stor.pdfmohammedfootwear
 
Are you familiar with the term parochialism What could be happen.pdf
Are you familiar with the term parochialism What could be happen.pdfAre you familiar with the term parochialism What could be happen.pdf
Are you familiar with the term parochialism What could be happen.pdfmohammedfootwear
 
Answer the question, What market structure is the airline industry.pdf
Answer the question, What market structure is the airline industry.pdfAnswer the question, What market structure is the airline industry.pdf
Answer the question, What market structure is the airline industry.pdfmohammedfootwear
 
Adding methods to the ListBag classIn the file ListBag.py, add the.pdf
Adding methods to the ListBag classIn the file ListBag.py, add the.pdfAdding methods to the ListBag classIn the file ListBag.py, add the.pdf
Adding methods to the ListBag classIn the file ListBag.py, add the.pdfmohammedfootwear
 
5. value 10.00 polnts On May 1, Soriano Co. reported the following ac.pdf
5. value 10.00 polnts On May 1, Soriano Co. reported the following ac.pdf5. value 10.00 polnts On May 1, Soriano Co. reported the following ac.pdf
5. value 10.00 polnts On May 1, Soriano Co. reported the following ac.pdfmohammedfootwear
 
C programming. Answer question only in C code In the eighth part, yo.pdf
C programming. Answer question only in C code In the eighth part, yo.pdfC programming. Answer question only in C code In the eighth part, yo.pdf
C programming. Answer question only in C code In the eighth part, yo.pdfmohammedfootwear
 
Biology Lab questions1. Why can a very small amount of bacteria b.pdf
Biology Lab questions1. Why can a very small amount of bacteria b.pdfBiology Lab questions1. Why can a very small amount of bacteria b.pdf
Biology Lab questions1. Why can a very small amount of bacteria b.pdfmohammedfootwear
 
You will choose a country, other than the USA or Turkey, that you wo.pdf
You will choose a country, other than the USA or Turkey, that you wo.pdfYou will choose a country, other than the USA or Turkey, that you wo.pdf
You will choose a country, other than the USA or Turkey, that you wo.pdfmohammedfootwear
 
Why does the RNA polymerase complex in eukaryotes contain a histone .pdf
Why does the RNA polymerase complex in eukaryotes contain a histone .pdfWhy does the RNA polymerase complex in eukaryotes contain a histone .pdf
Why does the RNA polymerase complex in eukaryotes contain a histone .pdfmohammedfootwear
 
what Linux command allows you to scan the disk for partition changes.pdf
what Linux command allows you to scan the disk for partition changes.pdfwhat Linux command allows you to scan the disk for partition changes.pdf
what Linux command allows you to scan the disk for partition changes.pdfmohammedfootwear
 
What is the correct answer Chrome File Edit View History Bookmarks.pdf
What is the correct answer Chrome File Edit View History Bookmarks.pdfWhat is the correct answer Chrome File Edit View History Bookmarks.pdf
What is the correct answer Chrome File Edit View History Bookmarks.pdfmohammedfootwear
 
What is fault tolerance, and what network aspects must be monitored .pdf
What is fault tolerance, and what network aspects must be monitored .pdfWhat is fault tolerance, and what network aspects must be monitored .pdf
What is fault tolerance, and what network aspects must be monitored .pdfmohammedfootwear
 
Using SQL Developer ONLY!Your assignment is to create an auditing .pdf
Using SQL Developer ONLY!Your assignment is to create an auditing .pdfUsing SQL Developer ONLY!Your assignment is to create an auditing .pdf
Using SQL Developer ONLY!Your assignment is to create an auditing .pdfmohammedfootwear
 
Use the definition of big- Theta to prove that 5x^4 + 2x^3 - 1 is The.pdf
Use the definition of big- Theta to prove that 5x^4 + 2x^3 - 1 is The.pdfUse the definition of big- Theta to prove that 5x^4 + 2x^3 - 1 is The.pdf
Use the definition of big- Theta to prove that 5x^4 + 2x^3 - 1 is The.pdfmohammedfootwear
 
To what degree, if any, has America’s ascendancy on the world stage .pdf
To what degree, if any, has America’s ascendancy on the world stage .pdfTo what degree, if any, has America’s ascendancy on the world stage .pdf
To what degree, if any, has America’s ascendancy on the world stage .pdfmohammedfootwear
 
This for English class.I need help for writing 4 to 5 paragraphs a.pdf
This for English class.I need help for writing 4 to 5 paragraphs a.pdfThis for English class.I need help for writing 4 to 5 paragraphs a.pdf
This for English class.I need help for writing 4 to 5 paragraphs a.pdfmohammedfootwear
 

More from mohammedfootwear (20)

Getting some errors when trying to run this program, can anyone help.pdf
Getting some errors when trying to run this program, can anyone help.pdfGetting some errors when trying to run this program, can anyone help.pdf
Getting some errors when trying to run this program, can anyone help.pdf
 
Discuss what is meant by Project Scope ManagementSolutionA pr.pdf
Discuss what is meant by Project Scope ManagementSolutionA pr.pdfDiscuss what is meant by Project Scope ManagementSolutionA pr.pdf
Discuss what is meant by Project Scope ManagementSolutionA pr.pdf
 
Determine if statement is true or false. If johnny likes suzy the ri.pdf
Determine if statement is true or false. If johnny likes suzy the ri.pdfDetermine if statement is true or false. If johnny likes suzy the ri.pdf
Determine if statement is true or false. If johnny likes suzy the ri.pdf
 
Describe one safeguard that should be in place to protect the confid.pdf
Describe one safeguard that should be in place to protect the confid.pdfDescribe one safeguard that should be in place to protect the confid.pdf
Describe one safeguard that should be in place to protect the confid.pdf
 
Create a storyboard prototype of a mobile app.When creating a stor.pdf
Create a storyboard prototype of a mobile app.When creating a stor.pdfCreate a storyboard prototype of a mobile app.When creating a stor.pdf
Create a storyboard prototype of a mobile app.When creating a stor.pdf
 
Are you familiar with the term parochialism What could be happen.pdf
Are you familiar with the term parochialism What could be happen.pdfAre you familiar with the term parochialism What could be happen.pdf
Are you familiar with the term parochialism What could be happen.pdf
 
Answer the question, What market structure is the airline industry.pdf
Answer the question, What market structure is the airline industry.pdfAnswer the question, What market structure is the airline industry.pdf
Answer the question, What market structure is the airline industry.pdf
 
Adding methods to the ListBag classIn the file ListBag.py, add the.pdf
Adding methods to the ListBag classIn the file ListBag.py, add the.pdfAdding methods to the ListBag classIn the file ListBag.py, add the.pdf
Adding methods to the ListBag classIn the file ListBag.py, add the.pdf
 
5. value 10.00 polnts On May 1, Soriano Co. reported the following ac.pdf
5. value 10.00 polnts On May 1, Soriano Co. reported the following ac.pdf5. value 10.00 polnts On May 1, Soriano Co. reported the following ac.pdf
5. value 10.00 polnts On May 1, Soriano Co. reported the following ac.pdf
 
C programming. Answer question only in C code In the eighth part, yo.pdf
C programming. Answer question only in C code In the eighth part, yo.pdfC programming. Answer question only in C code In the eighth part, yo.pdf
C programming. Answer question only in C code In the eighth part, yo.pdf
 
Biology Lab questions1. Why can a very small amount of bacteria b.pdf
Biology Lab questions1. Why can a very small amount of bacteria b.pdfBiology Lab questions1. Why can a very small amount of bacteria b.pdf
Biology Lab questions1. Why can a very small amount of bacteria b.pdf
 
You will choose a country, other than the USA or Turkey, that you wo.pdf
You will choose a country, other than the USA or Turkey, that you wo.pdfYou will choose a country, other than the USA or Turkey, that you wo.pdf
You will choose a country, other than the USA or Turkey, that you wo.pdf
 
Why does the RNA polymerase complex in eukaryotes contain a histone .pdf
Why does the RNA polymerase complex in eukaryotes contain a histone .pdfWhy does the RNA polymerase complex in eukaryotes contain a histone .pdf
Why does the RNA polymerase complex in eukaryotes contain a histone .pdf
 
what Linux command allows you to scan the disk for partition changes.pdf
what Linux command allows you to scan the disk for partition changes.pdfwhat Linux command allows you to scan the disk for partition changes.pdf
what Linux command allows you to scan the disk for partition changes.pdf
 
What is the correct answer Chrome File Edit View History Bookmarks.pdf
What is the correct answer Chrome File Edit View History Bookmarks.pdfWhat is the correct answer Chrome File Edit View History Bookmarks.pdf
What is the correct answer Chrome File Edit View History Bookmarks.pdf
 
What is fault tolerance, and what network aspects must be monitored .pdf
What is fault tolerance, and what network aspects must be monitored .pdfWhat is fault tolerance, and what network aspects must be monitored .pdf
What is fault tolerance, and what network aspects must be monitored .pdf
 
Using SQL Developer ONLY!Your assignment is to create an auditing .pdf
Using SQL Developer ONLY!Your assignment is to create an auditing .pdfUsing SQL Developer ONLY!Your assignment is to create an auditing .pdf
Using SQL Developer ONLY!Your assignment is to create an auditing .pdf
 
Use the definition of big- Theta to prove that 5x^4 + 2x^3 - 1 is The.pdf
Use the definition of big- Theta to prove that 5x^4 + 2x^3 - 1 is The.pdfUse the definition of big- Theta to prove that 5x^4 + 2x^3 - 1 is The.pdf
Use the definition of big- Theta to prove that 5x^4 + 2x^3 - 1 is The.pdf
 
To what degree, if any, has America’s ascendancy on the world stage .pdf
To what degree, if any, has America’s ascendancy on the world stage .pdfTo what degree, if any, has America’s ascendancy on the world stage .pdf
To what degree, if any, has America’s ascendancy on the world stage .pdf
 
This for English class.I need help for writing 4 to 5 paragraphs a.pdf
This for English class.I need help for writing 4 to 5 paragraphs a.pdfThis for English class.I need help for writing 4 to 5 paragraphs a.pdf
This for English class.I need help for writing 4 to 5 paragraphs a.pdf
 

Recently uploaded

Improved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio AppImproved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio AppCeline George
 
Graduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxGraduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxneillewis46
 
ANTI PARKISON DRUGS.pptx
ANTI         PARKISON          DRUGS.pptxANTI         PARKISON          DRUGS.pptx
ANTI PARKISON DRUGS.pptxPoojaSen20
 
SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project researchCaitlinCummins3
 
Trauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical PrinciplesTrauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical PrinciplesPooky Knightsmith
 
PSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxPSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxMarlene Maheu
 
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSean M. Fox
 
e-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopale-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi RajagopalEADTU
 
UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024Borja Sotomayor
 
Observing-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxObserving-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxAdelaideRefugio
 
diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....Ritu480198
 
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community PartnershipsSpring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community Partnershipsexpandedwebsite
 
How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17Celine George
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...EADTU
 
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of TransportBasic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of TransportDenish Jangid
 
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...Gary Wood
 
How to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptxHow to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptxCeline George
 
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...Nguyen Thanh Tu Collection
 

Recently uploaded (20)

Improved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio AppImproved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio App
 
Graduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxGraduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptx
 
Including Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdfIncluding Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdf
 
ANTI PARKISON DRUGS.pptx
ANTI         PARKISON          DRUGS.pptxANTI         PARKISON          DRUGS.pptx
ANTI PARKISON DRUGS.pptx
 
SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project research
 
Trauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical PrinciplesTrauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical Principles
 
PSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxPSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptx
 
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
 
e-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopale-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopal
 
UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024
 
Observing-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxObserving-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptx
 
diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....
 
VAMOS CUIDAR DO NOSSO PLANETA! .
VAMOS CUIDAR DO NOSSO PLANETA!                    .VAMOS CUIDAR DO NOSSO PLANETA!                    .
VAMOS CUIDAR DO NOSSO PLANETA! .
 
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community PartnershipsSpring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
 
How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
 
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of TransportBasic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
 
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
 
How to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptxHow to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptx
 
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
 

Please .pdf

  • 1. ***Please help!! This is the third time I'm posting this question*** ***All the instructions, sample output and previous HW5 paystub are down below please scroll down to view them.*** HW6: Paystub for Employee CSS 161 Fundamentals of Computing By: Hansel Ong Summary So far you have kept track of hours worked for only one employee. However, this is obviously not sustainable as companies typically have more than one employee some companies even have over 100,000 employees! Let's use the object-oriented programming (OOP) paradigm to simplify data collection and storage Estimated Work Needed This assignment took me about 30-45 minutes to write (not including challenges, but including testing, commenting, and cleanup) in less than 200 lines of code (total across three Java files) In other words, you should expect to spend between 135 to 450 minutes working on this assignment. If you've spent more than 7.5 hours working on this assignment, then you are likely struggling with arrays, loops, basic class design, methods, and the use of the new scope and should re-read the lecture slides (and attempt the exercises within), seek help from your fellow classmates, myself, your lab instructor, QSC tutor, as well as online resources. Skills Expected All the skills from previous Assignment(s) Class Object and Design, including but not limited to o Instance Variables o Getter and Setter (including input validation in Setters o Constructor o Methods Assignment Description You will write three Class objects (and subsequently submit three .java files): Paystub Employee EmployeeDriver Notes: ONLY the EmployeeDriver class should have static methods. · All the other classes should NOT have static methods or instance variables. Constants should still be static final The below is the minimum you must include-you could include additional instance variables, methods, etc. as you need Solution //EXAMPLE PROGRAM FOR SINGLE LINKED LIST # include # include # include # include struct list { int number; struct list *next; };
  • 2. typedef struct list node; node *first,*prev,*temp,*curr; void create(void) { printf(" Stop by -999"); temp=(node *)(malloc(sizeof(node))); printf(" Enter the numbers "); scanf("%d",&temp->number); while(temp->number!=-999) { temp->next=NULL; if(first==NULL) { first=temp; prev=first; } else { prev->next=temp; prev=temp; } temp=(node *)(malloc(sizeof(node))); scanf("%d",&temp->number); } //end of while } void delete1(void) { int num; printf(" Enter the number to delete "); scanf("%d",&num); if(first->number==num) { first=first->next; return; } else
  • 3. { prev=first; curr=first->next; while(curr->next!=NULL) { if(curr->number==num) { prev->next=curr->next; return; } prev=curr; curr=curr->next; } } if(curr->number==num) { prev->next=NULL; return; } printf(" No such number"); } void insertbefore(void) { int nu; temp=(node *)(malloc(sizeof(node))); printf(" Enter the number "); scanf("%d",&temp->number); printf(" Insert before which number "); scanf("%d",&nu); temp->next=NULL; prev=first; curr=first; if(first==NULL) //if the list is empty then we can insert in this way { first=temp; return;
  • 5. scanf("%d",&temp->number); printf(" Insert after which number "); scanf("%d",&nu); temp->next=NULL; prev=first; curr=first; if(first==NULL) //if the list is empty then we can insert in this way { first=temp; return; } if(curr->number==nu) { temp->next=curr->next; curr->next=temp; return; } else { prev=curr; curr=curr->next; while(curr->next!=NULL) { if(curr->number==nu) { temp->next=curr->next; curr->next=temp; return; } prev=curr; curr=curr->next; } } if(curr->number==nu) { curr->next=temp;
  • 6. return; } printf(" No such number "); } void print(void) { printf(" The list is "); printf(" ----------- "); temp=first; while(temp!=NULL) { printf("%d-->",temp->number); temp=temp->next; } printf("Nil"); getch(); } void main() { int ch=0; first=NULL; clrscr(); printf(" Linked List creation "); create(); clrscr(); while(ch!=5) { clrscr(); printf(" 1.Insert Before"); printf(" 2.Insert After"); printf(" 3.Delete "); printf(" 4.Print "); printf(" 5.Exit "); printf(" Enter your choice "); scanf("%d",&ch); switch(ch)
  • 7. { case 1: insertbefore(); print(); break; case 2: insertafter(); print(); break; case 3: delete1(); print(); break; case 4: print(); break; case 5: print(); exit(1); } } getch(); }