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

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

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