Create a class named student that has three member variables

Assignment Help JAVA Programming
Reference no: EM13324944

StudentClass
Create a class named Student that has three member variables:

  • name - A string for the name of the student.
  • numClasses - An integer for how many courses the student is currently enrolled in.
  • classList - An array of strings for the names of the classes the student is enrolled in.

Write appropriate constructor(s), mutator (set), and accessor (get) methods for the class along with the following:

  • A function that inputs all values from the user, including the list of class names.
  • A function that outputs the name and list of all courses.
  • A function that r e s e t s the number of classes to 0 and the classList to an empty array

(with null strings).
The main() should test all of these functions. It should perform the following steps in a loop: • It should ask the user to input a student's data.

  • Display the entered data back (in a well-formatted way).

1

  • Ask the user if they want to enter the data again (y/n).
  • If 'n', then the program ends, otherwise it should clear the student class object and

repeat the loop (ask the user to enter new data...).
Note: The statement 'cin >> variable;' leaves a newline character in the buffer. This can be a problem if you are mixing 'cin >> variable;' and the 'getline' function (that reads a line of input). Use 'cin.ignore' function to discard the newline character after using 'cin'.
Filename: student.cpp
please write comments if possible and make simple if possible.

 

Reference no: EM13324944

Questions Cloud

Find the force of reaction between the blook and the box : a spring of stiffiness k supports a box of mass M in which is placed a blokk of mass m. find the force of reaction between the blook and the box
Difference btween deductive-inductive paragraph organization : In planning to write a document, what questions must a manager ask before putting words on paper? Should they all receive equal emphasis? What is the difference btween deductive and inductive paragraph organization? Give an example of each.
Community supported agriculture : Your Community Supported Agriculture (CSA) farm delivers a box of fresh fruits and vegetables to your house once a week. For this programming project, define the class BoxOfProduce that c o n t a i n s exactly three bundles of fruits or vegetab..
Determine the width of the central bright fringe : Red light of wavelength 633nm from a helium-neon laser passes through a slit 0.370mm wide. What is the width of the central bright fringe
Create a class named student that has three member variables : Create a class named Student that has three member variables
Some disadvantages of using hackneyed phrases and jargon : Note several aspects of the context of managerial writing that make it unique. What are some of the advantages of short words over long words? Give examples of some recent obvious euphemisms used by people in advertising, public relations, or governm..
How high would he go : When jumping, a flea reaches a takeoff speed of 1.0m/s over a distance of 0.48mm. how high would he go
Explain moles of a monoprotic weak acid : The half-equivalence point of a titration occurs half way to the end point, where half of the analyte has reacted to form its conjugate, and the other half still remains unreacted. If 0.560 moles of a monoprotic weak acid
What are some advantages of written over oral communication : What are some advantages of written over oral communication? Breakdowns in the written process are less difficult to locate than are breakdowns in the oral process. Discuss this statement. Give an example of where two written messages on the same top..

Reviews

Write a Review

JAVA Programming Questions & Answers

  Class should have a method that returns the average

Write a class named TestScores. The class constructor should accept an array of test scores as its arguments. The class should have a method that returns the average of the test scores.

  Develop a graphical user interface based java program

Develop a Java program that can communicate with a real SMTP email server for sending emails. TNE 60003 - introduction to network programming, You program should provide a GUI and can successfully send the SMTP commands to the mail server

  Implement a client program

Implement a client program with a main method to demonstrate the evolution of the sales tax rates in the 50 US states over the last 10 years. Declare a two-dimensional array of values representing the sales tax rates. Dimension 1 represents the st..

  Program to translates a number into the closest letter grade

Write a program that translates a number into the closest letter grade. For example, the number 2.8 (which might have been the average of several grades) would be converted to B-. Break ties in favor of the better grade

  Dijikstra for undirected graph using simple scheme

Dijikstra for undirected graph using simple scheme with array and fibonacci heap and compare the performance/results, preferably in java.

  The main method must repeatedly have the use

After the method is defined, the main method must repeatedly have the user enter 3 integers, call the triangleType method and display the return type. Be sure not to have an infinite loop by allowing the user to quit.

  Including four sets of quadruplet andsevwn sets of triplets

Mrs. Bernard Scheinberg of Austria had sixty-nine children. Including four sets of quadruplet, sevwn sets of triplets, and sixten of twins. after Mrs. scheinberg died at the age of 56, her husband remarried. during his remaining years, he fathered an..

  Three most primary forms of loops: the while loop, the do..

explored the world of loops we have accepted the three most primary forms of loops: the while loop, the do...while loop (even though Python does not use this loop), and the for loop. The for loop has approximately three primary implementations that w..

  Write a class to represent a credit card.

write a class to represent a credit card.

  Write a test program that obtains from the user

Write a test program that obtains from the user the items to store in two sets A and B, and displays the union A u B, the inter- section A n B, and the dierence A \ B. The data type of the items is your choice. ( you can only store objects.)

  Record managing system application

Build a student record managing system application

  What are the values of these boolean expressions

Describe the steps for inserting a new item at the head of a linked list? Make sure you consider all possible incoming conditions.

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