SlideShare a Scribd company logo
1 of 1
1. Create a project in NetBeans and name the project Hw04. 2. Design and create a class that
holds a student's first name, last name, total earned credit hours, total quality points, and GPA.
The definition of the class is given as follows: // default constructor public StudentRecord 0 { //
ald code here to initialize data members of the class } // constructor // paramters: nm: name, Eh:
Earned credit hours, QPts: Total quality points public StudentRecord (string nm, int Eh, int QPts)
{ // add code here to initidize data members of the class } // get the name of the student public
string getName0 { // add code here } // get earned hours public int getEarnedCho { // aul code
here } // get total quality points public int getQualPtso { // add code here } // get GPA public
double getGPAO { // add code here y // Change the student's name public void setName(string
nm) { // add code here 3 // Change earned hours and update GPA public void setEarnedCh(int
Eh) { // add code here // Change total quality points and update GPA public void setQualPts(int
QPts){ // auld code here } Give the implementations of the class constructors and member
functions 3. Define the following interface and class public interface Sortinterface { / This
method sorts the items of the StudentRecord array according to students' GPA in ascending order
void sortGPA(StudentRecord v [ ] , int n ); // n is number of valid elements in the array } public
class Sort implements Sortinterface { public void sortGPA(StudentRecord v[], int n ) { I/ add
code here ) / This method searches an item in a StudentRecord array v using a specific GPA. If a
match found, the method returns the index of the item in the array. Otherwise, the method returns
1 . You must. use binary search algorithm to implement the method (assume the array is sorted
according to students' GPA). Parameter n is the number of valid elements in the array public int
SearchGPA(SudentRecord v [ ] , int n, double gpa) { // add code here } } 4. Write a test
program that (1) Defines a StudentRecord array and necessary variables (2) Reads student's
name, earned credit hours, and total quality points from keyboard, and stores them as an item
(StudentRecord object) in the array (3) Repeat (2) for more items until user presses a specific key
to stop it (4) Sorts the array by calling the method SortGPAO (5) Dienlav the iteme in the arrav
accordino to the followino format. (6) Ask user for a GPA, and call the method SearchGPAO to
search the array. If a match is found, i.e, there is an item with the target GPA in the array, display
the information of item in the following format: (assume 2.00 is target GPA) Found a record:
Name: Steven Liu Credit Hours: 30 QualityPoints: 60 GPA: 2.00 If no match is found, display
No matched record!

More Related Content

Similar to 1- Create a project in NetBeans and name the project Hw04- 2- Design a (1).docx

Student.h #include stdafx.h #include string using names.pdf
Student.h #include stdafx.h #include string using names.pdfStudent.h #include stdafx.h #include string using names.pdf
Student.h #include stdafx.h #include string using names.pdffoottraders
 
Header #include -string- #include -vector- #include -iostream- using.pdf
Header #include -string- #include -vector- #include -iostream-   using.pdfHeader #include -string- #include -vector- #include -iostream-   using.pdf
Header #include -string- #include -vector- #include -iostream- using.pdfgaurav444u
 
Assignment 7
Assignment 7Assignment 7
Assignment 7IIUM
 
A457405934_21789_26_2018_Inheritance.ppt
A457405934_21789_26_2018_Inheritance.pptA457405934_21789_26_2018_Inheritance.ppt
A457405934_21789_26_2018_Inheritance.pptRithwikRanjan
 
03 object-classes-pbl-4-slots
03 object-classes-pbl-4-slots03 object-classes-pbl-4-slots
03 object-classes-pbl-4-slotsmha4
 
03 object-classes-pbl-4-slots
03 object-classes-pbl-4-slots03 object-classes-pbl-4-slots
03 object-classes-pbl-4-slotsmha4
 
Take Note These questions requires diagrams.Scenario Sweetbriar .pdf
Take Note These questions requires diagrams.Scenario Sweetbriar .pdfTake Note These questions requires diagrams.Scenario Sweetbriar .pdf
Take Note These questions requires diagrams.Scenario Sweetbriar .pdfeyeonsecuritysystems
 
Assignment #4 will be the construction of 2 new classes and a driver program/...
Assignment #4 will be the construction of 2 new classes and a driver program/...Assignment #4 will be the construction of 2 new classes and a driver program/...
Assignment #4 will be the construction of 2 new classes and a driver program/...hwbloom3
 
How to write you first class in c++ object oriented programming
How to write you first class in c++ object oriented programmingHow to write you first class in c++ object oriented programming
How to write you first class in c++ object oriented programmingSyed Faizan Hassan
 

Similar to 1- Create a project in NetBeans and name the project Hw04- 2- Design a (1).docx (14)

Student.h #include stdafx.h #include string using names.pdf
Student.h #include stdafx.h #include string using names.pdfStudent.h #include stdafx.h #include string using names.pdf
Student.h #include stdafx.h #include string using names.pdf
 
Oop
OopOop
Oop
 
Header #include -string- #include -vector- #include -iostream- using.pdf
Header #include -string- #include -vector- #include -iostream-   using.pdfHeader #include -string- #include -vector- #include -iostream-   using.pdf
Header #include -string- #include -vector- #include -iostream- using.pdf
 
Assignment 7
Assignment 7Assignment 7
Assignment 7
 
Java chapter 4
Java chapter 4Java chapter 4
Java chapter 4
 
A457405934_21789_26_2018_Inheritance.ppt
A457405934_21789_26_2018_Inheritance.pptA457405934_21789_26_2018_Inheritance.ppt
A457405934_21789_26_2018_Inheritance.ppt
 
03 object-classes-pbl-4-slots
03 object-classes-pbl-4-slots03 object-classes-pbl-4-slots
03 object-classes-pbl-4-slots
 
03 object-classes-pbl-4-slots
03 object-classes-pbl-4-slots03 object-classes-pbl-4-slots
03 object-classes-pbl-4-slots
 
Invoke dynamics
Invoke dynamicsInvoke dynamics
Invoke dynamics
 
Take Note These questions requires diagrams.Scenario Sweetbriar .pdf
Take Note These questions requires diagrams.Scenario Sweetbriar .pdfTake Note These questions requires diagrams.Scenario Sweetbriar .pdf
Take Note These questions requires diagrams.Scenario Sweetbriar .pdf
 
Assignment #4 will be the construction of 2 new classes and a driver program/...
Assignment #4 will be the construction of 2 new classes and a driver program/...Assignment #4 will be the construction of 2 new classes and a driver program/...
Assignment #4 will be the construction of 2 new classes and a driver program/...
 
Lecture 2 classes i
Lecture 2 classes iLecture 2 classes i
Lecture 2 classes i
 
OOP Lab Report.docx
OOP Lab Report.docxOOP Lab Report.docx
OOP Lab Report.docx
 
How to write you first class in c++ object oriented programming
How to write you first class in c++ object oriented programmingHow to write you first class in c++ object oriented programming
How to write you first class in c++ object oriented programming
 

More from Dominic3YGRobertsz

1) Create a form based on the Products data with a Category combo box.docx
1) Create a form based on the Products data with a Category combo box.docx1) Create a form based on the Products data with a Category combo box.docx
1) Create a form based on the Products data with a Category combo box.docxDominic3YGRobertsz
 
1- A null hypothesis- 2- A research hypothesis- 3- A discrete variable.docx
1- A null hypothesis- 2- A research hypothesis- 3- A discrete variable.docx1- A null hypothesis- 2- A research hypothesis- 3- A discrete variable.docx
1- A null hypothesis- 2- A research hypothesis- 3- A discrete variable.docxDominic3YGRobertsz
 
1) In the solar system- the inner planets are and composed mostly of c.docx
1) In the solar system- the inner planets are and composed mostly of c.docx1) In the solar system- the inner planets are and composed mostly of c.docx
1) In the solar system- the inner planets are and composed mostly of c.docxDominic3YGRobertsz
 
1 Point Assume that the skill demo 1 server is running on port on What.docx
1 Point Assume that the skill demo 1 server is running on port on What.docx1 Point Assume that the skill demo 1 server is running on port on What.docx
1 Point Assume that the skill demo 1 server is running on port on What.docxDominic3YGRobertsz
 
1 point are highly specialized phagocytic cells that present antigen t.docx
1 point are highly specialized phagocytic cells that present antigen t.docx1 point are highly specialized phagocytic cells that present antigen t.docx
1 point are highly specialized phagocytic cells that present antigen t.docxDominic3YGRobertsz
 
1) What is OSHA and how does it help protect workers- 2) What types of.docx
1) What is OSHA and how does it help protect workers- 2) What types of.docx1) What is OSHA and how does it help protect workers- 2) What types of.docx
1) What is OSHA and how does it help protect workers- 2) What types of.docxDominic3YGRobertsz
 
1) All of the following are permanent differences between book and tax.docx
1) All of the following are permanent differences between book and tax.docx1) All of the following are permanent differences between book and tax.docx
1) All of the following are permanent differences between book and tax.docxDominic3YGRobertsz
 
1) Draw a diagram of Fungal and Plant Symbiosis using the words listed.docx
1) Draw a diagram of Fungal and Plant Symbiosis using the words listed.docx1) Draw a diagram of Fungal and Plant Symbiosis using the words listed.docx
1) Draw a diagram of Fungal and Plant Symbiosis using the words listed.docxDominic3YGRobertsz
 
0-32 sar sog and ze iff care sante and Rein esperted retum arancised e.docx
0-32 sar sog and ze iff care sante and Rein esperted retum arancised e.docx0-32 sar sog and ze iff care sante and Rein esperted retum arancised e.docx
0-32 sar sog and ze iff care sante and Rein esperted retum arancised e.docxDominic3YGRobertsz
 
1- If X is Poisson ()- compute E-1-(X+1)--.docx
1- If X is Poisson ()- compute E-1-(X+1)--.docx1- If X is Poisson ()- compute E-1-(X+1)--.docx
1- If X is Poisson ()- compute E-1-(X+1)--.docxDominic3YGRobertsz
 
1- This sample is from what class of tissue- A-Epithelial tissue B- Mu.docx
1- This sample is from what class of tissue- A-Epithelial tissue B- Mu.docx1- This sample is from what class of tissue- A-Epithelial tissue B- Mu.docx
1- This sample is from what class of tissue- A-Epithelial tissue B- Mu.docxDominic3YGRobertsz
 
1- Twitter is kind of an outcome of focus group research toward Facebo.docx
1- Twitter is kind of an outcome of focus group research toward Facebo.docx1- Twitter is kind of an outcome of focus group research toward Facebo.docx
1- Twitter is kind of an outcome of focus group research toward Facebo.docxDominic3YGRobertsz
 
1- The documentary of The Social Dilemma emphasizes the potential issu.docx
1- The documentary of The Social Dilemma emphasizes the potential issu.docx1- The documentary of The Social Dilemma emphasizes the potential issu.docx
1- The documentary of The Social Dilemma emphasizes the potential issu.docxDominic3YGRobertsz
 
1- Summarize the interactions that lead to the proper expression of ev.docx
1- Summarize the interactions that lead to the proper expression of ev.docx1- Summarize the interactions that lead to the proper expression of ev.docx
1- Summarize the interactions that lead to the proper expression of ev.docxDominic3YGRobertsz
 
1- Study the four contemporary CSR concepts- corporate sustainability-.docx
1- Study the four contemporary CSR concepts- corporate sustainability-.docx1- Study the four contemporary CSR concepts- corporate sustainability-.docx
1- Study the four contemporary CSR concepts- corporate sustainability-.docxDominic3YGRobertsz
 
1- Number the nodes according to the order of exploring- In case of a.docx
1- Number the nodes according to the order of exploring- In case of a.docx1- Number the nodes according to the order of exploring- In case of a.docx
1- Number the nodes according to the order of exploring- In case of a.docxDominic3YGRobertsz
 
1- Name lymphoid organs and match to their corresponding functions- Na.docx
1- Name lymphoid organs and match to their corresponding functions- Na.docx1- Name lymphoid organs and match to their corresponding functions- Na.docx
1- Name lymphoid organs and match to their corresponding functions- Na.docxDominic3YGRobertsz
 
1- List and understand the functions of the skeletal system- 2- Bones-.docx
1- List and understand the functions of the skeletal system- 2- Bones-.docx1- List and understand the functions of the skeletal system- 2- Bones-.docx
1- List and understand the functions of the skeletal system- 2- Bones-.docxDominic3YGRobertsz
 
1- Let a continuous random variable ZN(0-1)- Calculate the following a.docx
1- Let a continuous random variable ZN(0-1)- Calculate the following a.docx1- Let a continuous random variable ZN(0-1)- Calculate the following a.docx
1- Let a continuous random variable ZN(0-1)- Calculate the following a.docxDominic3YGRobertsz
 

More from Dominic3YGRobertsz (20)

1) Create a form based on the Products data with a Category combo box.docx
1) Create a form based on the Products data with a Category combo box.docx1) Create a form based on the Products data with a Category combo box.docx
1) Create a form based on the Products data with a Category combo box.docx
 
1- A null hypothesis- 2- A research hypothesis- 3- A discrete variable.docx
1- A null hypothesis- 2- A research hypothesis- 3- A discrete variable.docx1- A null hypothesis- 2- A research hypothesis- 3- A discrete variable.docx
1- A null hypothesis- 2- A research hypothesis- 3- A discrete variable.docx
 
1) In the solar system- the inner planets are and composed mostly of c.docx
1) In the solar system- the inner planets are and composed mostly of c.docx1) In the solar system- the inner planets are and composed mostly of c.docx
1) In the solar system- the inner planets are and composed mostly of c.docx
 
1 Point Assume that the skill demo 1 server is running on port on What.docx
1 Point Assume that the skill demo 1 server is running on port on What.docx1 Point Assume that the skill demo 1 server is running on port on What.docx
1 Point Assume that the skill demo 1 server is running on port on What.docx
 
1 point are highly specialized phagocytic cells that present antigen t.docx
1 point are highly specialized phagocytic cells that present antigen t.docx1 point are highly specialized phagocytic cells that present antigen t.docx
1 point are highly specialized phagocytic cells that present antigen t.docx
 
0-83 0-33 0-50 0-67.docx
0-83 0-33 0-50 0-67.docx0-83 0-33 0-50 0-67.docx
0-83 0-33 0-50 0-67.docx
 
1) What is OSHA and how does it help protect workers- 2) What types of.docx
1) What is OSHA and how does it help protect workers- 2) What types of.docx1) What is OSHA and how does it help protect workers- 2) What types of.docx
1) What is OSHA and how does it help protect workers- 2) What types of.docx
 
1) All of the following are permanent differences between book and tax.docx
1) All of the following are permanent differences between book and tax.docx1) All of the following are permanent differences between book and tax.docx
1) All of the following are permanent differences between book and tax.docx
 
1) Draw a diagram of Fungal and Plant Symbiosis using the words listed.docx
1) Draw a diagram of Fungal and Plant Symbiosis using the words listed.docx1) Draw a diagram of Fungal and Plant Symbiosis using the words listed.docx
1) Draw a diagram of Fungal and Plant Symbiosis using the words listed.docx
 
0-32 sar sog and ze iff care sante and Rein esperted retum arancised e.docx
0-32 sar sog and ze iff care sante and Rein esperted retum arancised e.docx0-32 sar sog and ze iff care sante and Rein esperted retum arancised e.docx
0-32 sar sog and ze iff care sante and Rein esperted retum arancised e.docx
 
1- If X is Poisson ()- compute E-1-(X+1)--.docx
1- If X is Poisson ()- compute E-1-(X+1)--.docx1- If X is Poisson ()- compute E-1-(X+1)--.docx
1- If X is Poisson ()- compute E-1-(X+1)--.docx
 
1- This sample is from what class of tissue- A-Epithelial tissue B- Mu.docx
1- This sample is from what class of tissue- A-Epithelial tissue B- Mu.docx1- This sample is from what class of tissue- A-Epithelial tissue B- Mu.docx
1- This sample is from what class of tissue- A-Epithelial tissue B- Mu.docx
 
1- Twitter is kind of an outcome of focus group research toward Facebo.docx
1- Twitter is kind of an outcome of focus group research toward Facebo.docx1- Twitter is kind of an outcome of focus group research toward Facebo.docx
1- Twitter is kind of an outcome of focus group research toward Facebo.docx
 
1- The documentary of The Social Dilemma emphasizes the potential issu.docx
1- The documentary of The Social Dilemma emphasizes the potential issu.docx1- The documentary of The Social Dilemma emphasizes the potential issu.docx
1- The documentary of The Social Dilemma emphasizes the potential issu.docx
 
1- Summarize the interactions that lead to the proper expression of ev.docx
1- Summarize the interactions that lead to the proper expression of ev.docx1- Summarize the interactions that lead to the proper expression of ev.docx
1- Summarize the interactions that lead to the proper expression of ev.docx
 
1- Study the four contemporary CSR concepts- corporate sustainability-.docx
1- Study the four contemporary CSR concepts- corporate sustainability-.docx1- Study the four contemporary CSR concepts- corporate sustainability-.docx
1- Study the four contemporary CSR concepts- corporate sustainability-.docx
 
1- Number the nodes according to the order of exploring- In case of a.docx
1- Number the nodes according to the order of exploring- In case of a.docx1- Number the nodes according to the order of exploring- In case of a.docx
1- Number the nodes according to the order of exploring- In case of a.docx
 
1- Name lymphoid organs and match to their corresponding functions- Na.docx
1- Name lymphoid organs and match to their corresponding functions- Na.docx1- Name lymphoid organs and match to their corresponding functions- Na.docx
1- Name lymphoid organs and match to their corresponding functions- Na.docx
 
1- List and understand the functions of the skeletal system- 2- Bones-.docx
1- List and understand the functions of the skeletal system- 2- Bones-.docx1- List and understand the functions of the skeletal system- 2- Bones-.docx
1- List and understand the functions of the skeletal system- 2- Bones-.docx
 
1- Let a continuous random variable ZN(0-1)- Calculate the following a.docx
1- Let a continuous random variable ZN(0-1)- Calculate the following a.docx1- Let a continuous random variable ZN(0-1)- Calculate the following a.docx
1- Let a continuous random variable ZN(0-1)- Calculate the following a.docx
 

Recently uploaded

Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...PsychoTech Services
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 

Recently uploaded (20)

Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 

1- Create a project in NetBeans and name the project Hw04- 2- Design a (1).docx

  • 1. 1. Create a project in NetBeans and name the project Hw04. 2. Design and create a class that holds a student's first name, last name, total earned credit hours, total quality points, and GPA. The definition of the class is given as follows: // default constructor public StudentRecord 0 { // ald code here to initialize data members of the class } // constructor // paramters: nm: name, Eh: Earned credit hours, QPts: Total quality points public StudentRecord (string nm, int Eh, int QPts) { // add code here to initidize data members of the class } // get the name of the student public string getName0 { // add code here } // get earned hours public int getEarnedCho { // aul code here } // get total quality points public int getQualPtso { // add code here } // get GPA public double getGPAO { // add code here y // Change the student's name public void setName(string nm) { // add code here 3 // Change earned hours and update GPA public void setEarnedCh(int Eh) { // add code here // Change total quality points and update GPA public void setQualPts(int QPts){ // auld code here } Give the implementations of the class constructors and member functions 3. Define the following interface and class public interface Sortinterface { / This method sorts the items of the StudentRecord array according to students' GPA in ascending order void sortGPA(StudentRecord v [ ] , int n ); // n is number of valid elements in the array } public class Sort implements Sortinterface { public void sortGPA(StudentRecord v[], int n ) { I/ add code here ) / This method searches an item in a StudentRecord array v using a specific GPA. If a match found, the method returns the index of the item in the array. Otherwise, the method returns 1 . You must. use binary search algorithm to implement the method (assume the array is sorted according to students' GPA). Parameter n is the number of valid elements in the array public int SearchGPA(SudentRecord v [ ] , int n, double gpa) { // add code here } } 4. Write a test program that (1) Defines a StudentRecord array and necessary variables (2) Reads student's name, earned credit hours, and total quality points from keyboard, and stores them as an item (StudentRecord object) in the array (3) Repeat (2) for more items until user presses a specific key to stop it (4) Sorts the array by calling the method SortGPAO (5) Dienlav the iteme in the arrav accordino to the followino format. (6) Ask user for a GPA, and call the method SearchGPAO to search the array. If a match is found, i.e, there is an item with the target GPA in the array, display the information of item in the following format: (assume 2.00 is target GPA) Found a record: Name: Steven Liu Credit Hours: 30 QualityPoints: 60 GPA: 2.00 If no match is found, display No matched record!