Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Code the following non-member functions:


1. A non-member function getStudInfo that receives a file name along with an array of


student objects. This function will use the data given in a file called studMarks.csv to


populate an array of students accordingly. You can assume the given file contains valid


data for each student. Figure 2 shows the contents of the given csv file, the sequence of fields is as follows : student_number,gender,subject_code,mark1,mark2,mark3


. Write non-member function sortDescending that will sort all student objects in descending order according to year mark (predicate).Make use of your overloaded operator(s).


3. Write a non-member function displayStudentInfo that will display all sorted student information. Output should be displayed as shown in the sample output; marks will not


be awarded if this is not adhered to.


4. Write a non-member function calcAvgForSubject that calculates and displays the average year mark of students doing a given subject.

Create a class called Student; this class is inherited from the Subject class.


This class must have the following data members:


A student number, for example “200605544”.A character member for storing a student gender, for example ‘M’ for male and ‘F’ for female


This class must have the following methods:


A public default constructor that sets data members to appropriate default values.A setStudent method that provides the relevant data members with valid


supplied values. Ensure that a student number is not an empty string and that


only M/mF/f are supplied for gender.A method called getStudNum that returns a student number.A method called getGender that returns a student’s gender, for example


“Female”.An overloaded + operator that will accumulate the year marks of two or more students An overloaded > operator that checks if one student’s year mark is greater than


another students’ An overloaded == that checks a student’s subject code against a given value

Create a base class called Subject



This class must have the following data members:



A c-string subject code that will hold a 7 character code, for example “TPG11BT”. A Boolean exam entry indicator that will hold a value indicating whether or not exam entry has been obtained for the subject.An array for storing test marks.A year mark for storing the calculated year mark or predicate



This class must have the following methods:A public default constructor that sets the data members to appropriate default



values.A copy constructor.A private calcYearMark method that calculates and stores a year mark obtained on a subject. A year mark of 40% or more is needed in order to obtain exam entry; adjust the exam entry indicator accordingly based on year mark

Can someone give me any alogrithims that show all functions in a calculator

clear that plagiarism is a sticky ethical issue, ranging from accidental infractions to outright theft of intellectual property. Review the Code of Academic Integrity in the UoPeople Catalog (available on UoPeople's website, https://www.uopeople.edu), and then write a reflection answering the following questions:




1. Did any of the information in the Catalog - such as the consequences - surprise you? Why or why not?



2. Given the potential consequences for plagiarizing, why do you think students engage in plagiarism? Be sure to explore at least two possible reasons why students might plagiarize.



3. What strategies will you use to avoid plagiarism?








Create a class named Complex which contains:

  • data field named real of type double
  • data field named imag of type double
  • no-arg constructor that initializes real & imag to 0
  • parametrized constructor with specified values for real & imag
  • overloaded stream extraction operator << that will display a complex number in the form a + bi
  • overloaded stream insertion operator >> that will ask the user for real and imag part of the complex number
  • overloaded binary + operator and a binary – operator
  • overloaded binary * operator and / operator
  • function mag() that will return the magnitude of the complex number.
  • function conjuage() that returns the conjugate of a complex number

Sample:

Enter the first complex number

Enter real part:  3

Enter imag part: 4

Enter the second complex number

Enter real part:  4

Enter imag part: -6

You entered the numbers

C1 = 3 + 4i

C2 = 4 – 6i

1: Addition

2: Subtraction

3: Multiplication

4: Division

5: Magnitude

6: conjugate

9: Quit

Enter your selection: 1

C1 + C2  = 7 - 2i



def countdown(n):


if n <= 0:


print('Blastoff!')


else:


print(n)


countdown(n-1)



Write a new recursive function countup that expects a negative argument and counts “up” from that number. Output from running the function should look something like this:



>>> countup(-3)


-3


-2


-1


Blastoff!



Write a Python program that gets a number using keyboard input. (Remember to use input for Python 3 but raw_input for Python 2.)



If the number is positive, the program should call countdown. If the number is negative, the program should call countup. Choose for yourself which function to call (countdown or countup) for input of zero.



Provide the following.



The code of your program.


Output for the following input: a positive number, a negative number, and zero.


An explanation of your choice for

Problem Statement 

Given list of students’ records. Write a program with signature as below:  Method Name: getStudentsWithMarksMoreThan()  Input: marks – Integer  

Output: List of Students having marks more than input  If possible add Unit Test case – both positive and negative.  

You can do in choice of your language (Any high level language like – PHP, JavaScript, Angular). 

For example JSON given below of 3 students for your reference.  


{  

 "students":[  

 {  

 "roll_no":101,  

 "details":{  

 "name":"ajay",  

 "marks":42,  

 "age":20  

 }  

 },  

 {  

 "roll_no":102,  

 "details":{  

 "name":"amit",  

 "marks":45,  

 "age":21  

 }  

 },  

 {  

 "roll_no":111,  

 "details":{  

 "name":"ramesn",  

 "marks":31,  

 "age":21  

 } } ] }




Initialize two (2) variables to hold the employee name and the gross pay (amount before deductions). See sample output below.


Employee Name: Jess Diaz

Gross Pay: 25000.0

_________________________

Deductions Amount

Witholding Tax 3750.0

SSS Contributions: 907.5

Medicare: 312.5

Pagibig Contribution: 100.0

__________________________

Net Pay: 19930.0




Write a program that reverses the input number n. Formulate an equation to come up with the answer:

(Apply the three loop statements in your solutions) Sample input/output dialogue:


Enter a number: 1238 Input data

Reverse number: 8321 Output value


1st Solution using- for loop

2nd Solution using- while loop

3rd Solution using- do while loop


LATEST TUTORIALS
APPROVED BY CLIENTS