How many instance variables does this class contain

Assignment Help Computer Engineering
Reference no: EM132138029

/** A student who is taking quizzes. */ public class Student { private String name; private double totalScore; private int quizCount; public Student (String n) { name = n; totalScore = 0; quizCount = 0; } public String getName() } return name; } public void addQuiz)int score) { totalScore = totalScore + score; quizCount = quizCount + 1; } public double getToalScore() { return totalScore; } public double getAverageScore() { return totalScore / quizCount: } }

Questions needing answering related to this code:

1) How many instance variables does this class contain?

2) Which variable in the constructor is being updated by a parameter?

3) How many methods are there in this class

4) How many methods are 'mutators'?

5) What do you think the primary purpose is of this class?

6) Write the java method call that would add a quiz score of 95?

7) Which methods do/does not return a value?

8) If we wanted each score to count two times, which method needs to be modified?

9) Can quiz scores with decimals be entered?

Reference no: EM132138029

Questions Cloud

Find the probability that the sample mean : Suppose that a random sample of 40 college science textbooks was taken. Find the probability that the sample mean is more than 235 dollars.
What is the probability of getting exactly : If you are tossing a fair coin 10 times, what is the probability of getting exactly 9 heads out of the 10 coin tosses?
Undertaking expansionary fiscal policy : The government is undertaking expansionary fiscal policy. Illustrate how this action affects:
Why does a government undertakes expansionary fiscal policy : Why does a government undertakes expansionary fiscal policy? What are the problems of undertaking expansionary fiscal policy?
How many instance variables does this class contain : How many instance variables does this class contain? Which variable in the constructor is being updated by a parameter?
What is the role of local government leadership : What is the role of local government leadership in assuring that departments and divisions work together to achieve municipal goals and objectives?
Percent of lumber from the three suppliers : What is the percent of clear lumber from each of the three suppliers? What is the percent of lumber from each of the three suppliers.
What is stuxnet and what are its real-world implications : Should your national government be concerned about the potential of a Stuxnet-like attack? Why or why not.
Minimum long run average total cost : The industry is currently at a long-run equilibrium, with each firm producing at its minimum long run average total cost of $8.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd