Create a Student Object project. Create a Student class and use the provided UML diagram to code the instance fields, constructors and methods.  Note: The module mark is the average of the participation mark and the examination mark - calculate this using the calcModuleMark() method. The determineStNumber() method should compile a student number with the first 3 letters of the student's name, a '#' symbol, and a 3-digit randomly generated number (make use of a for-loop to concatenate these 3-digits).

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

 

1.1  Create a Student Object project.

Create a Student class and use the provided UML diagram to code the instance fields, constructors and methods. 

Note:

The module mark is the average of the participation mark and the examination mark - calculate this using the calcModuleMark() method.

The determineStNumber() method should compile a student number with the first 3 letters of the student's name, a '#' symbol, and a 3-digit randomly generated number (make use of a for-loop to concatenate these 3-digits).

The stNumber data field should be set in the constructor by calling the determineStNumber() method.  

The toString() method must compile a string to display the student number, participation mark, examination mark, and module mark, formatted in table format.

Student number      PMark     EMark     MMark
Mar#9186               81        64     72.00

1.2  Create a testStudents class.  Do the following:

-Write a static method called display() which receives the Student object as a parameter, and displays the necessary heading, as well as the toString() method from the Object class.

-In the main method, you should ask for the following input: the student's name, participation mark and an examination mark.

-Make use of a while-loop to input multiple student details, and use a sentinel control to stop input. 

-After each student's details have been entered, instantiate an object of the Student class by calling the classes constructor.

-Use the display() method to display the student's results before entering another student's details.

Student
-name:string
|-stNumber:string
-partMark:int
-examMark:int
+Student()
+Student(name: string, partMark:int, examMark:int)
+getStNumber():string
+getPartmark():int
+getExammark():int
+determineStNumber():string
+calcModuleMark():double
+toString():string
Transcribed Image Text:Student -name:string |-stNumber:string -partMark:int -examMark:int +Student() +Student(name: string, partMark:int, examMark:int) +getStNumber():string +getPartmark():int +getExammark():int +determineStNumber():string +calcModuleMark():double +toString():string
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Development strategies
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education