COMP 228: Java Programming Lab Assignment #1 – Java Classes Solved

50.00 $

Category: Tags: , , , , , , , ,
Click Category Button to View Your Next Assignment | Homework

You'll get a download link with a: zip solution files instantly, after Payment

Securely Powered by: Secure Checkout

Description

5/5 - (6 votes)

 Exercise 1:

 Write a Java console application (using IDE: eclipse Developer/enterprise Edition: 2020-06) that is used to keep records of singers and displays stored record. Follow the following instructions to develop the application:

Create a class named Singer (Singer.java) with the following specifications:

  1. 5 instance variables that would store the following singer data (Use recommended variable naming conventions and appropriate data type for each instance variable): [5 marks] 1) Singer’s id
    • Singer’s name
    • Singer’s address
    • Date of birth
    • Number of albums published
  2. Several overloaded constructors that would allow you to construct Singer object with no arguments, 1 argument, 2 arguments, 3 arguments, 4 arguments, and 5 arguments. [5 marks]

 

  1. Create Setters and getters for all the instance variables of class Singer. Make sure to have several setters that would allow you to set the values of individual instance variables of the singer object. Also create one setter that would allow you to set all the values of the instance variables at once. Create several getters that would allow you to get the current individual values of each instance variables of the Singer object.                      [10 marks]

 

  1. Create the driver class (SingerTest – SingerTest.java) that would create one Singer (singer1) object with the help of the no argument constructor. Display the default values of the instance variables of this object singer1.

 [5 marks]

  1. Set the values of each instance variables with the help of setters. Display the values. [5 marks]

Evaluation:

Functionality
Correct implementation of classes (instance variable declarations,

constructors, getters and setters

methods, etc.)

45%

 

Correct implementation of driver classes (declaring and creating objects, calling their methods,

interacting with user, displaying

results)

45%
Friendly input/output 10%
Total 100%

 

 

  • Lab01-tspbyk.zip