Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8431019
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T05:44:37+00:00 2026-06-10T05:44:37+00:00

I have the below question, and would like to know if I have interpreted

  • 0

I have the below question, and would like to know if I have interpreted the question right or not. I am new to the Java and programming so the technical terms even thought I read my textbook and understood them I am not sure that if I have programmed them correctly. Please see the question and let me know if what I am doing is in the right direction.

enter image description here

The question itself:

You are asked to implement a class to keep track of the students' academic result for a module. The system requires the following information about a student:
 Student identification - a unique 7-digit identification that begins with 'S' for local students and 'F' for foreign student. E.g. S1234567.
 Student name
 Quiz mark - an integer number in the range of 0 to 100
 Assignment mark - an integer number in the range of 0 to 100
 Exam mark - a floating point number in the range of 0 to 100
 Resit student - true if the student is retaking the paper, false otherwise. Resit student does not have quiz and assignment marks.
Write a Java class called Student and provide the following:
 suitable instance variables for the information described above
 constructor(s) with the appropriate actions on the instance variables
 the accessor methods for the instance variables
 the computeScore() method to compute the score as follows:
for resit students, take only the exam mark as the score
for other students, score is calculated by using the formula
9% * quiz + 21% * assignment + 70% * exam
The score calculated is to be rounded up to the nearest integer and returned.
 the findGrade() method that returns the grade based on the score:

Score range
Grade
80 to 100
A
70 to 79
B
60 to 69
C
50 to 59
D
0 to 49
F
 the toString() method that returns the attribute values as a string with description.

then this is the code i have so far is that correct? i mean the way i declared the constructors and such…tks

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package student_qn4;

/**
 *
 * @author 
 */
public class Student 
{
   private String student_idno, student_name;
   private int mark_quiz, mark_assig;
   private float mark_exam;
   private boolean student_resit;


   public Student (String id, String name , int quizM , int assignM , int examM) {

 studentId = id;
 studentName = name;
 quizMark = quizM;
 assignMark = assignM;
 examMark = examM;
 }

   public void setStudentnumber(String number)
   {
       student_idno = number;
   }

   public String getStudentnumber()
   {
       return student_idno;
   }

   public void setStudentname(String name)
   {
       student_name = name;
   }

   public String getStudentname()
   {
       return student_name;
   }

    public void setquizMark(int quizmarks)
   {
       mark_quiz = quizmarks;
   }

   public int getquizMark()
   {
       return mark_quiz;
   }


    public void setassigMark(int assigmarks)
   {
       mark_assig = assigmarks;
   }

   public int getassigMark()
   {
       return mark_assig;
   }


   public int computerScore()
   {
       /*do as the program asks then return the computer score */



   }



   public String findGrade()
   {
       // Based on the computeScore() I have to access what is the grade and return that
   }

   public String toString()
   {
       // What is this method supposed to do?
   }

}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T05:44:39+00:00Added an answer on June 10, 2026 at 5:44 am

    generally ok, if you take on board the comments made in the other answer.

    However, your naming conventions are a bit wacky. Standard java bean convention is to name your properties (your ints and so on) with camelCase (so markQuiz rather than mark_quiz) and your getters and setters as getMarkQuiz and setMarkQuiz (the 1st letter after get/set is now capitalized) For boolean properties, use isXxx() rather than getXxx().

    These conventions are widely used and will make your code more tool friendly (with ides such as ecliipse/netbeans)

    Regards to your comment after your question, homework questions are generally frowned upon, which is why you got down voted. You will learn far more by playing and experimenting, getting it wrong and then fixing it, than by coming here asking for an answer. At least you did provide a skeleton answer, so you are thinking about it, so well done for that.Keep at it!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to know if the below question is possible using NSComparator or
I have a question which is described below: What problems would arise for testing
I have been given the below .NET question in an interview. I don’t know
The question I would like to ask is if the Javascript snippet below is
I am studying Java concurrency right now. I have a question about synchronized and
In conjunction a previous question of mine, I would like to know exactly what
Problem solved, see below Question I'm working in Flex Builder 3 and I have
I have a figure below: And my question is that the objects in Array
Edit: original question below, but I revise it now that I have some code
This might be a confusing question but I have written below a Directory crawler,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.